@camstack/addon-provider-dreame 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
|
@@ -58523,6 +58523,20 @@ var RelocateJobSchema = object({
|
|
|
58523
58523
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
58524
58524
|
*/
|
|
58525
58525
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
58526
|
+
/**
|
|
58527
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
58528
|
+
*
|
|
58529
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
58530
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
58531
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
58532
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
58533
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
58534
|
+
* the same failure as one that quietly skips them (D295).
|
|
58535
|
+
*
|
|
58536
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
58537
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
58538
|
+
*/
|
|
58539
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
58526
58540
|
startedAt: number(),
|
|
58527
58541
|
finishedAt: number().nullable(),
|
|
58528
58542
|
error: string().nullable()
|
|
@@ -58886,6 +58900,91 @@ var RelocateResidueSchema = object({
|
|
|
58886
58900
|
segments: number().int().nonnegative(),
|
|
58887
58901
|
bytes: number().int().nonnegative()
|
|
58888
58902
|
}).nullable();
|
|
58903
|
+
/**
|
|
58904
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
58905
|
+
* (D319).
|
|
58906
|
+
*
|
|
58907
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
58908
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
58909
|
+
* destructive run before authorising it.
|
|
58910
|
+
*/
|
|
58911
|
+
var LedgerWalkInputSchema = object({
|
|
58912
|
+
locationId: string().min(1),
|
|
58913
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
58914
|
+
apply: boolean().optional(),
|
|
58915
|
+
/** Narrow to one camera. */
|
|
58916
|
+
deviceId: number().int().positive().optional(),
|
|
58917
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
58918
|
+
profiles: array(string().min(1)).optional()
|
|
58919
|
+
});
|
|
58920
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
58921
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
58922
|
+
"location-unknown",
|
|
58923
|
+
"source-writable",
|
|
58924
|
+
"no-ledger",
|
|
58925
|
+
"archive-unreadable",
|
|
58926
|
+
"anchor-absent",
|
|
58927
|
+
"anchor-unreadable",
|
|
58928
|
+
"anchor-moved"
|
|
58929
|
+
]);
|
|
58930
|
+
_enum([
|
|
58931
|
+
"live-tail",
|
|
58932
|
+
"listing-error",
|
|
58933
|
+
"path-mismatch",
|
|
58934
|
+
"durable-refused"
|
|
58935
|
+
]);
|
|
58936
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
58937
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
58938
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
58939
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
58940
|
+
"live-tail": number().int().nonnegative(),
|
|
58941
|
+
"listing-error": number().int().nonnegative(),
|
|
58942
|
+
"path-mismatch": number().int().nonnegative(),
|
|
58943
|
+
"durable-refused": number().int().nonnegative()
|
|
58944
|
+
});
|
|
58945
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
58946
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
58947
|
+
deviceId: number().int(),
|
|
58948
|
+
hoursWalked: number().int().nonnegative(),
|
|
58949
|
+
hoursMissing: number().int().nonnegative(),
|
|
58950
|
+
ghostSegments: number().int().nonnegative(),
|
|
58951
|
+
ghostBytes: number().int().nonnegative(),
|
|
58952
|
+
forgottenSegments: number().int().nonnegative(),
|
|
58953
|
+
orphanFiles: number().int().nonnegative()
|
|
58954
|
+
});
|
|
58955
|
+
/**
|
|
58956
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
58957
|
+
*
|
|
58958
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
58959
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
58960
|
+
* than in the absence of one.
|
|
58961
|
+
*/
|
|
58962
|
+
var LedgerWalkReportSchema = object({
|
|
58963
|
+
locationId: string(),
|
|
58964
|
+
applied: boolean(),
|
|
58965
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
58966
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
58967
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
58968
|
+
hoursClaimed: number().int().nonnegative(),
|
|
58969
|
+
hoursWalked: number().int().nonnegative(),
|
|
58970
|
+
hoursMissing: number().int().nonnegative(),
|
|
58971
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
58972
|
+
listings: number().int().nonnegative(),
|
|
58973
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
58974
|
+
ghostSegments: number().int().nonnegative(),
|
|
58975
|
+
ghostBytes: number().int().nonnegative(),
|
|
58976
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
58977
|
+
forgottenSegments: number().int().nonnegative(),
|
|
58978
|
+
forgottenBytes: number().int().nonnegative(),
|
|
58979
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
58980
|
+
orphanFiles: number().int().nonnegative(),
|
|
58981
|
+
orphanSample: array(string()).readonly(),
|
|
58982
|
+
hoursSkipped: number().int().nonnegative(),
|
|
58983
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
58984
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
58985
|
+
bounded: boolean(),
|
|
58986
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
58987
|
+
});
|
|
58889
58988
|
/** How many rows a media pass would still act on against a given target — the
|
|
58890
58989
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
58891
58990
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -69518,13 +69617,15 @@ var ListGroupsPageSchema = object({
|
|
|
69518
69617
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
69519
69618
|
nextCursor: string().nullable()
|
|
69520
69619
|
});
|
|
69620
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
69621
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
69521
69622
|
var KeyEventQueryInput = object({
|
|
69522
69623
|
deviceId: number(),
|
|
69523
69624
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
69524
69625
|
since: number(),
|
|
69525
69626
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
69526
69627
|
until: number(),
|
|
69527
|
-
limit: number().int().min(1).max(
|
|
69628
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
69528
69629
|
/** Drop tracks scoring below this importance. */
|
|
69529
69630
|
minImportance: number().min(0).max(1).optional(),
|
|
69530
69631
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -69546,6 +69647,32 @@ var KeyEventSchema = object({
|
|
|
69546
69647
|
...TrackFlagFields,
|
|
69547
69648
|
...TrackRetrainFields
|
|
69548
69649
|
});
|
|
69650
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
69651
|
+
var KeyEventBatchQueryInput = object({
|
|
69652
|
+
deviceIds: array(number()).min(1).max(200),
|
|
69653
|
+
since: number(),
|
|
69654
|
+
until: number(),
|
|
69655
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
69656
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
69657
|
+
* rows and change what the merged feed contains. */
|
|
69658
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
69659
|
+
minImportance: number().min(0).max(1).optional(),
|
|
69660
|
+
classFilter: string().optional()
|
|
69661
|
+
});
|
|
69662
|
+
/**
|
|
69663
|
+
* One camera's key events in a batch answer.
|
|
69664
|
+
*
|
|
69665
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
69666
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
69667
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
69668
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
69669
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
69670
|
+
* key, which only worked because there was one query per camera).
|
|
69671
|
+
*/
|
|
69672
|
+
var KeyEventsForDeviceSchema = object({
|
|
69673
|
+
deviceId: number(),
|
|
69674
|
+
events: array(KeyEventSchema).readonly()
|
|
69675
|
+
});
|
|
69549
69676
|
object({
|
|
69550
69677
|
trackId: string(),
|
|
69551
69678
|
className: string(),
|
|
@@ -69617,6 +69744,50 @@ var EventStoreFootprintSchema = object({
|
|
|
69617
69744
|
totalBytes: number().int(),
|
|
69618
69745
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
69619
69746
|
});
|
|
69747
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
69748
|
+
var EventMediaKindFootprintSchema = object({
|
|
69749
|
+
kind: MediaFileKindEnum,
|
|
69750
|
+
/** Media rows of this kind. */
|
|
69751
|
+
rows: number().int(),
|
|
69752
|
+
/** Bytes on disk held by those rows. */
|
|
69753
|
+
bytes: number().int()
|
|
69754
|
+
});
|
|
69755
|
+
/**
|
|
69756
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
69757
|
+
* actually turns on.
|
|
69758
|
+
*
|
|
69759
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
69760
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
69761
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
69762
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
69763
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
69764
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
69765
|
+
*
|
|
69766
|
+
* ## Why `unaccounted*` exists
|
|
69767
|
+
*
|
|
69768
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
69769
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
69770
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
69771
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
69772
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
69773
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
69774
|
+
* against a denominator smaller than the disk.
|
|
69775
|
+
*
|
|
69776
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
69777
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
69778
|
+
*/
|
|
69779
|
+
var EventMediaKindBreakdownSchema = object({
|
|
69780
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
69781
|
+
totalRows: number().int(),
|
|
69782
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
69783
|
+
totalBytes: number().int(),
|
|
69784
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
69785
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
69786
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
69787
|
+
unaccountedRows: number().int(),
|
|
69788
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
69789
|
+
unaccountedBytes: number().int()
|
|
69790
|
+
});
|
|
69620
69791
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
69621
69792
|
var EventPruneCountsSchema = object({
|
|
69622
69793
|
motion: number().int(),
|
|
@@ -69771,7 +69942,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
69771
69942
|
until: number().optional(),
|
|
69772
69943
|
kinds: array(string()).optional(),
|
|
69773
69944
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
69774
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
69945
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
69775
69946
|
deviceId: number(),
|
|
69776
69947
|
since: number(),
|
|
69777
69948
|
until: number(),
|
|
@@ -69820,6 +69991,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
69820
69991
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
69821
69992
|
kind: "query",
|
|
69822
69993
|
auth: "admin"
|
|
69994
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
69995
|
+
kind: "query",
|
|
69996
|
+
auth: "admin"
|
|
69823
69997
|
}), method(object({
|
|
69824
69998
|
olderThanMs: number(),
|
|
69825
69999
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -71771,6 +71945,20 @@ method(object({
|
|
|
71771
71945
|
error: string().optional()
|
|
71772
71946
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
71773
71947
|
providerId: string(),
|
|
71948
|
+
/**
|
|
71949
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
71950
|
+
*
|
|
71951
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
71952
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
71953
|
+
* credential the operator did not retype — and posting that here
|
|
71954
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
71955
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
71956
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
71957
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
71958
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
71959
|
+
* every value was typed just now and nothing is stored yet.
|
|
71960
|
+
*/
|
|
71961
|
+
locationId: string().optional(),
|
|
71774
71962
|
config: record(string(), unknown())
|
|
71775
71963
|
}), object({
|
|
71776
71964
|
ok: boolean(),
|
|
@@ -79146,6 +79334,9 @@ method(object({
|
|
|
79146
79334
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
79147
79335
|
kind: "query",
|
|
79148
79336
|
auth: "admin"
|
|
79337
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
79338
|
+
kind: "mutation",
|
|
79339
|
+
auth: "admin"
|
|
79149
79340
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
79150
79341
|
kind: "mutation",
|
|
79151
79342
|
auth: "admin"
|
|
@@ -79537,6 +79728,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
79537
79728
|
monitors: array(SceneMonitorSchema),
|
|
79538
79729
|
lastFetchedAt: number()
|
|
79539
79730
|
});
|
|
79731
|
+
/**
|
|
79732
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
79733
|
+
*
|
|
79734
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
79735
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
79736
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
79737
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
79738
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
79739
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
79740
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
79741
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
79742
|
+
*
|
|
79743
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
79744
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
79745
|
+
*/
|
|
79746
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
79747
|
+
deviceId: number(),
|
|
79748
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
79749
|
+
});
|
|
79540
79750
|
var sceneMonitorCapability = {
|
|
79541
79751
|
name: "scene-monitor",
|
|
79542
79752
|
scope: "device",
|
|
@@ -79546,6 +79756,22 @@ var sceneMonitorCapability = {
|
|
|
79546
79756
|
deviceTypes: [DeviceType.Camera],
|
|
79547
79757
|
methods: {
|
|
79548
79758
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
79759
|
+
/**
|
|
79760
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
79761
|
+
*
|
|
79762
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
79763
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
79764
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
79765
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
79766
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
79767
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
79768
|
+
*
|
|
79769
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
79770
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
79771
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
79772
|
+
* tell which two are missing, or that any are.
|
|
79773
|
+
*/
|
|
79774
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
79549
79775
|
createScene: method(object({
|
|
79550
79776
|
deviceId: number(),
|
|
79551
79777
|
label: string(),
|
|
@@ -81381,6 +81607,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
81381
81607
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
81382
81608
|
});
|
|
81383
81609
|
/**
|
|
81610
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
81611
|
+
*
|
|
81612
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
81613
|
+
* because `snapshot: null` was already spoken for:
|
|
81614
|
+
*
|
|
81615
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
81616
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
81617
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
81618
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
81619
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
81620
|
+
*
|
|
81621
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
81622
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
81623
|
+
* which is a definite claim about a camera nobody could read.
|
|
81624
|
+
*/
|
|
81625
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
81626
|
+
deviceId: number(),
|
|
81627
|
+
read: _enum(["read", "unreadable"]),
|
|
81628
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
81629
|
+
});
|
|
81630
|
+
/**
|
|
81384
81631
|
* Time-series resolution. The history methods return one bucket per
|
|
81385
81632
|
* step over the requested range. Smaller resolutions cost more
|
|
81386
81633
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -81437,6 +81684,20 @@ var zoneAnalyticsCapability = {
|
|
|
81437
81684
|
* (no inference result emitted since boot or since binding was
|
|
81438
81685
|
* activated). */
|
|
81439
81686
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
81687
|
+
/**
|
|
81688
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
81689
|
+
*
|
|
81690
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
81691
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
81692
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
81693
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
81694
|
+
* work is unchanged.
|
|
81695
|
+
*
|
|
81696
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
81697
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
81698
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
81699
|
+
*/
|
|
81700
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
81440
81701
|
/** Time-series object count inside one zone. `className` optional —
|
|
81441
81702
|
* omit to count every class in the zone. */
|
|
81442
81703
|
getZoneHistory: method(object({
|
|
@@ -85834,6 +86095,12 @@ Object.freeze({
|
|
|
85834
86095
|
addonId: null,
|
|
85835
86096
|
access: "view"
|
|
85836
86097
|
},
|
|
86098
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
86099
|
+
capName: "pipeline-analytics",
|
|
86100
|
+
capScope: "device",
|
|
86101
|
+
addonId: null,
|
|
86102
|
+
access: "view"
|
|
86103
|
+
},
|
|
85837
86104
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
85838
86105
|
capName: "pipeline-analytics",
|
|
85839
86106
|
capScope: "device",
|
|
@@ -85852,6 +86119,12 @@ Object.freeze({
|
|
|
85852
86119
|
addonId: null,
|
|
85853
86120
|
access: "view"
|
|
85854
86121
|
},
|
|
86122
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
86123
|
+
capName: "pipeline-analytics",
|
|
86124
|
+
capScope: "device",
|
|
86125
|
+
addonId: null,
|
|
86126
|
+
access: "view"
|
|
86127
|
+
},
|
|
85855
86128
|
"pipelineAnalytics.getMotionEvents": {
|
|
85856
86129
|
capName: "pipeline-analytics",
|
|
85857
86130
|
capScope: "device",
|
|
@@ -87028,6 +87301,12 @@ Object.freeze({
|
|
|
87028
87301
|
addonId: null,
|
|
87029
87302
|
access: "view"
|
|
87030
87303
|
},
|
|
87304
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
87305
|
+
capName: "recording",
|
|
87306
|
+
capScope: "system",
|
|
87307
|
+
addonId: null,
|
|
87308
|
+
access: "create"
|
|
87309
|
+
},
|
|
87031
87310
|
"recording.refreshStorageLocationsForMigration": {
|
|
87032
87311
|
capName: "recording",
|
|
87033
87312
|
capScope: "system",
|
|
@@ -87154,6 +87433,12 @@ Object.freeze({
|
|
|
87154
87433
|
addonId: null,
|
|
87155
87434
|
access: "view"
|
|
87156
87435
|
},
|
|
87436
|
+
"sceneMonitor.listScenesBatch": {
|
|
87437
|
+
capName: "scene-monitor",
|
|
87438
|
+
capScope: "device",
|
|
87439
|
+
addonId: null,
|
|
87440
|
+
access: "view"
|
|
87441
|
+
},
|
|
87157
87442
|
"sceneMonitor.recheckNow": {
|
|
87158
87443
|
capName: "scene-monitor",
|
|
87159
87444
|
capScope: "device",
|
|
@@ -88510,6 +88795,12 @@ Object.freeze({
|
|
|
88510
88795
|
addonId: null,
|
|
88511
88796
|
access: "view"
|
|
88512
88797
|
},
|
|
88798
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
88799
|
+
capName: "zone-analytics",
|
|
88800
|
+
capScope: "device",
|
|
88801
|
+
addonId: null,
|
|
88802
|
+
access: "view"
|
|
88803
|
+
},
|
|
88513
88804
|
"zoneAnalytics.getUnzonedHistory": {
|
|
88514
88805
|
capName: "zone-analytics",
|
|
88515
88806
|
capScope: "device",
|
|
@@ -89499,6 +89790,11 @@ Object.freeze({
|
|
|
89499
89790
|
form: "single",
|
|
89500
89791
|
optional: false
|
|
89501
89792
|
}],
|
|
89793
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
89794
|
+
name: "deviceId",
|
|
89795
|
+
form: "single",
|
|
89796
|
+
optional: true
|
|
89797
|
+
}],
|
|
89502
89798
|
"pipelineAnalytics.getGroup": [{
|
|
89503
89799
|
name: "deviceId",
|
|
89504
89800
|
form: "single",
|
|
@@ -89509,6 +89805,11 @@ Object.freeze({
|
|
|
89509
89805
|
form: "single",
|
|
89510
89806
|
optional: false
|
|
89511
89807
|
}],
|
|
89808
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
89809
|
+
name: "deviceIds",
|
|
89810
|
+
form: "array",
|
|
89811
|
+
optional: false
|
|
89812
|
+
}],
|
|
89512
89813
|
"pipelineAnalytics.getMotionEvents": [{
|
|
89513
89814
|
name: "deviceId",
|
|
89514
89815
|
form: "single",
|
|
@@ -89949,6 +90250,11 @@ Object.freeze({
|
|
|
89949
90250
|
form: "single",
|
|
89950
90251
|
optional: false
|
|
89951
90252
|
}],
|
|
90253
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
90254
|
+
name: "deviceId",
|
|
90255
|
+
form: "single",
|
|
90256
|
+
optional: true
|
|
90257
|
+
}],
|
|
89952
90258
|
"recording.relocateFootage": [{
|
|
89953
90259
|
name: "deviceId",
|
|
89954
90260
|
form: "single",
|
|
@@ -90014,6 +90320,11 @@ Object.freeze({
|
|
|
90014
90320
|
form: "single",
|
|
90015
90321
|
optional: false
|
|
90016
90322
|
}],
|
|
90323
|
+
"sceneMonitor.listScenesBatch": [{
|
|
90324
|
+
name: "deviceIds",
|
|
90325
|
+
form: "array",
|
|
90326
|
+
optional: false
|
|
90327
|
+
}],
|
|
90017
90328
|
"sceneMonitor.recheckNow": [{
|
|
90018
90329
|
name: "deviceId",
|
|
90019
90330
|
form: "single",
|
|
@@ -90275,6 +90586,11 @@ Object.freeze({
|
|
|
90275
90586
|
form: "single",
|
|
90276
90587
|
optional: false
|
|
90277
90588
|
}],
|
|
90589
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
90590
|
+
name: "deviceIds",
|
|
90591
|
+
form: "array",
|
|
90592
|
+
optional: false
|
|
90593
|
+
}],
|
|
90278
90594
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
90279
90595
|
name: "deviceId",
|
|
90280
90596
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -58523,6 +58523,20 @@ var RelocateJobSchema = object({
|
|
|
58523
58523
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
58524
58524
|
*/
|
|
58525
58525
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
58526
|
+
/**
|
|
58527
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
58528
|
+
*
|
|
58529
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
58530
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
58531
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
58532
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
58533
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
58534
|
+
* the same failure as one that quietly skips them (D295).
|
|
58535
|
+
*
|
|
58536
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
58537
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
58538
|
+
*/
|
|
58539
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
58526
58540
|
startedAt: number(),
|
|
58527
58541
|
finishedAt: number().nullable(),
|
|
58528
58542
|
error: string().nullable()
|
|
@@ -58886,6 +58900,91 @@ var RelocateResidueSchema = object({
|
|
|
58886
58900
|
segments: number().int().nonnegative(),
|
|
58887
58901
|
bytes: number().int().nonnegative()
|
|
58888
58902
|
}).nullable();
|
|
58903
|
+
/**
|
|
58904
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
58905
|
+
* (D319).
|
|
58906
|
+
*
|
|
58907
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
58908
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
58909
|
+
* destructive run before authorising it.
|
|
58910
|
+
*/
|
|
58911
|
+
var LedgerWalkInputSchema = object({
|
|
58912
|
+
locationId: string().min(1),
|
|
58913
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
58914
|
+
apply: boolean().optional(),
|
|
58915
|
+
/** Narrow to one camera. */
|
|
58916
|
+
deviceId: number().int().positive().optional(),
|
|
58917
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
58918
|
+
profiles: array(string().min(1)).optional()
|
|
58919
|
+
});
|
|
58920
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
58921
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
58922
|
+
"location-unknown",
|
|
58923
|
+
"source-writable",
|
|
58924
|
+
"no-ledger",
|
|
58925
|
+
"archive-unreadable",
|
|
58926
|
+
"anchor-absent",
|
|
58927
|
+
"anchor-unreadable",
|
|
58928
|
+
"anchor-moved"
|
|
58929
|
+
]);
|
|
58930
|
+
_enum([
|
|
58931
|
+
"live-tail",
|
|
58932
|
+
"listing-error",
|
|
58933
|
+
"path-mismatch",
|
|
58934
|
+
"durable-refused"
|
|
58935
|
+
]);
|
|
58936
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
58937
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
58938
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
58939
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
58940
|
+
"live-tail": number().int().nonnegative(),
|
|
58941
|
+
"listing-error": number().int().nonnegative(),
|
|
58942
|
+
"path-mismatch": number().int().nonnegative(),
|
|
58943
|
+
"durable-refused": number().int().nonnegative()
|
|
58944
|
+
});
|
|
58945
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
58946
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
58947
|
+
deviceId: number().int(),
|
|
58948
|
+
hoursWalked: number().int().nonnegative(),
|
|
58949
|
+
hoursMissing: number().int().nonnegative(),
|
|
58950
|
+
ghostSegments: number().int().nonnegative(),
|
|
58951
|
+
ghostBytes: number().int().nonnegative(),
|
|
58952
|
+
forgottenSegments: number().int().nonnegative(),
|
|
58953
|
+
orphanFiles: number().int().nonnegative()
|
|
58954
|
+
});
|
|
58955
|
+
/**
|
|
58956
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
58957
|
+
*
|
|
58958
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
58959
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
58960
|
+
* than in the absence of one.
|
|
58961
|
+
*/
|
|
58962
|
+
var LedgerWalkReportSchema = object({
|
|
58963
|
+
locationId: string(),
|
|
58964
|
+
applied: boolean(),
|
|
58965
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
58966
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
58967
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
58968
|
+
hoursClaimed: number().int().nonnegative(),
|
|
58969
|
+
hoursWalked: number().int().nonnegative(),
|
|
58970
|
+
hoursMissing: number().int().nonnegative(),
|
|
58971
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
58972
|
+
listings: number().int().nonnegative(),
|
|
58973
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
58974
|
+
ghostSegments: number().int().nonnegative(),
|
|
58975
|
+
ghostBytes: number().int().nonnegative(),
|
|
58976
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
58977
|
+
forgottenSegments: number().int().nonnegative(),
|
|
58978
|
+
forgottenBytes: number().int().nonnegative(),
|
|
58979
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
58980
|
+
orphanFiles: number().int().nonnegative(),
|
|
58981
|
+
orphanSample: array(string()).readonly(),
|
|
58982
|
+
hoursSkipped: number().int().nonnegative(),
|
|
58983
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
58984
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
58985
|
+
bounded: boolean(),
|
|
58986
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
58987
|
+
});
|
|
58889
58988
|
/** How many rows a media pass would still act on against a given target — the
|
|
58890
58989
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
58891
58990
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -69518,13 +69617,15 @@ var ListGroupsPageSchema = object({
|
|
|
69518
69617
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
69519
69618
|
nextCursor: string().nullable()
|
|
69520
69619
|
});
|
|
69620
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
69621
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
69521
69622
|
var KeyEventQueryInput = object({
|
|
69522
69623
|
deviceId: number(),
|
|
69523
69624
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
69524
69625
|
since: number(),
|
|
69525
69626
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
69526
69627
|
until: number(),
|
|
69527
|
-
limit: number().int().min(1).max(
|
|
69628
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
69528
69629
|
/** Drop tracks scoring below this importance. */
|
|
69529
69630
|
minImportance: number().min(0).max(1).optional(),
|
|
69530
69631
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -69546,6 +69647,32 @@ var KeyEventSchema = object({
|
|
|
69546
69647
|
...TrackFlagFields,
|
|
69547
69648
|
...TrackRetrainFields
|
|
69548
69649
|
});
|
|
69650
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
69651
|
+
var KeyEventBatchQueryInput = object({
|
|
69652
|
+
deviceIds: array(number()).min(1).max(200),
|
|
69653
|
+
since: number(),
|
|
69654
|
+
until: number(),
|
|
69655
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
69656
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
69657
|
+
* rows and change what the merged feed contains. */
|
|
69658
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
69659
|
+
minImportance: number().min(0).max(1).optional(),
|
|
69660
|
+
classFilter: string().optional()
|
|
69661
|
+
});
|
|
69662
|
+
/**
|
|
69663
|
+
* One camera's key events in a batch answer.
|
|
69664
|
+
*
|
|
69665
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
69666
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
69667
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
69668
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
69669
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
69670
|
+
* key, which only worked because there was one query per camera).
|
|
69671
|
+
*/
|
|
69672
|
+
var KeyEventsForDeviceSchema = object({
|
|
69673
|
+
deviceId: number(),
|
|
69674
|
+
events: array(KeyEventSchema).readonly()
|
|
69675
|
+
});
|
|
69549
69676
|
object({
|
|
69550
69677
|
trackId: string(),
|
|
69551
69678
|
className: string(),
|
|
@@ -69617,6 +69744,50 @@ var EventStoreFootprintSchema = object({
|
|
|
69617
69744
|
totalBytes: number().int(),
|
|
69618
69745
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
69619
69746
|
});
|
|
69747
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
69748
|
+
var EventMediaKindFootprintSchema = object({
|
|
69749
|
+
kind: MediaFileKindEnum,
|
|
69750
|
+
/** Media rows of this kind. */
|
|
69751
|
+
rows: number().int(),
|
|
69752
|
+
/** Bytes on disk held by those rows. */
|
|
69753
|
+
bytes: number().int()
|
|
69754
|
+
});
|
|
69755
|
+
/**
|
|
69756
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
69757
|
+
* actually turns on.
|
|
69758
|
+
*
|
|
69759
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
69760
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
69761
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
69762
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
69763
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
69764
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
69765
|
+
*
|
|
69766
|
+
* ## Why `unaccounted*` exists
|
|
69767
|
+
*
|
|
69768
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
69769
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
69770
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
69771
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
69772
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
69773
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
69774
|
+
* against a denominator smaller than the disk.
|
|
69775
|
+
*
|
|
69776
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
69777
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
69778
|
+
*/
|
|
69779
|
+
var EventMediaKindBreakdownSchema = object({
|
|
69780
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
69781
|
+
totalRows: number().int(),
|
|
69782
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
69783
|
+
totalBytes: number().int(),
|
|
69784
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
69785
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
69786
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
69787
|
+
unaccountedRows: number().int(),
|
|
69788
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
69789
|
+
unaccountedBytes: number().int()
|
|
69790
|
+
});
|
|
69620
69791
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
69621
69792
|
var EventPruneCountsSchema = object({
|
|
69622
69793
|
motion: number().int(),
|
|
@@ -69771,7 +69942,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
69771
69942
|
until: number().optional(),
|
|
69772
69943
|
kinds: array(string()).optional(),
|
|
69773
69944
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
69774
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
69945
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
69775
69946
|
deviceId: number(),
|
|
69776
69947
|
since: number(),
|
|
69777
69948
|
until: number(),
|
|
@@ -69820,6 +69991,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
69820
69991
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
69821
69992
|
kind: "query",
|
|
69822
69993
|
auth: "admin"
|
|
69994
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
69995
|
+
kind: "query",
|
|
69996
|
+
auth: "admin"
|
|
69823
69997
|
}), method(object({
|
|
69824
69998
|
olderThanMs: number(),
|
|
69825
69999
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -71771,6 +71945,20 @@ method(object({
|
|
|
71771
71945
|
error: string().optional()
|
|
71772
71946
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
71773
71947
|
providerId: string(),
|
|
71948
|
+
/**
|
|
71949
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
71950
|
+
*
|
|
71951
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
71952
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
71953
|
+
* credential the operator did not retype — and posting that here
|
|
71954
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
71955
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
71956
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
71957
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
71958
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
71959
|
+
* every value was typed just now and nothing is stored yet.
|
|
71960
|
+
*/
|
|
71961
|
+
locationId: string().optional(),
|
|
71774
71962
|
config: record(string(), unknown())
|
|
71775
71963
|
}), object({
|
|
71776
71964
|
ok: boolean(),
|
|
@@ -79146,6 +79334,9 @@ method(object({
|
|
|
79146
79334
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
79147
79335
|
kind: "query",
|
|
79148
79336
|
auth: "admin"
|
|
79337
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
79338
|
+
kind: "mutation",
|
|
79339
|
+
auth: "admin"
|
|
79149
79340
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
79150
79341
|
kind: "mutation",
|
|
79151
79342
|
auth: "admin"
|
|
@@ -79537,6 +79728,25 @@ var SceneMonitorStatusSchema = object({
|
|
|
79537
79728
|
monitors: array(SceneMonitorSchema),
|
|
79538
79729
|
lastFetchedAt: number()
|
|
79539
79730
|
});
|
|
79731
|
+
/**
|
|
79732
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
79733
|
+
*
|
|
79734
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
79735
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
79736
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
79737
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
79738
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
79739
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
79740
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
79741
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
79742
|
+
*
|
|
79743
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
79744
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
79745
|
+
*/
|
|
79746
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
79747
|
+
deviceId: number(),
|
|
79748
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
79749
|
+
});
|
|
79540
79750
|
var sceneMonitorCapability = {
|
|
79541
79751
|
name: "scene-monitor",
|
|
79542
79752
|
scope: "device",
|
|
@@ -79546,6 +79756,22 @@ var sceneMonitorCapability = {
|
|
|
79546
79756
|
deviceTypes: [DeviceType.Camera],
|
|
79547
79757
|
methods: {
|
|
79548
79758
|
listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
|
|
79759
|
+
/**
|
|
79760
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
79761
|
+
*
|
|
79762
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
79763
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
79764
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
79765
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
79766
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
79767
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
79768
|
+
*
|
|
79769
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
79770
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
79771
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
79772
|
+
* tell which two are missing, or that any are.
|
|
79773
|
+
*/
|
|
79774
|
+
listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
|
|
79549
79775
|
createScene: method(object({
|
|
79550
79776
|
deviceId: number(),
|
|
79551
79777
|
label: string(),
|
|
@@ -81381,6 +81607,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
81381
81607
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
81382
81608
|
});
|
|
81383
81609
|
/**
|
|
81610
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
81611
|
+
*
|
|
81612
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
81613
|
+
* because `snapshot: null` was already spoken for:
|
|
81614
|
+
*
|
|
81615
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
81616
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
81617
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
81618
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
81619
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
81620
|
+
*
|
|
81621
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
81622
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
81623
|
+
* which is a definite claim about a camera nobody could read.
|
|
81624
|
+
*/
|
|
81625
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
81626
|
+
deviceId: number(),
|
|
81627
|
+
read: _enum(["read", "unreadable"]),
|
|
81628
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
81629
|
+
});
|
|
81630
|
+
/**
|
|
81384
81631
|
* Time-series resolution. The history methods return one bucket per
|
|
81385
81632
|
* step over the requested range. Smaller resolutions cost more
|
|
81386
81633
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -81437,6 +81684,20 @@ var zoneAnalyticsCapability = {
|
|
|
81437
81684
|
* (no inference result emitted since boot or since binding was
|
|
81438
81685
|
* activated). */
|
|
81439
81686
|
getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
|
|
81687
|
+
/**
|
|
81688
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
81689
|
+
*
|
|
81690
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
81691
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
81692
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
81693
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
81694
|
+
* work is unchanged.
|
|
81695
|
+
*
|
|
81696
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
81697
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
81698
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
81699
|
+
*/
|
|
81700
|
+
getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
|
|
81440
81701
|
/** Time-series object count inside one zone. `className` optional —
|
|
81441
81702
|
* omit to count every class in the zone. */
|
|
81442
81703
|
getZoneHistory: method(object({
|
|
@@ -85834,6 +86095,12 @@ Object.freeze({
|
|
|
85834
86095
|
addonId: null,
|
|
85835
86096
|
access: "view"
|
|
85836
86097
|
},
|
|
86098
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
86099
|
+
capName: "pipeline-analytics",
|
|
86100
|
+
capScope: "device",
|
|
86101
|
+
addonId: null,
|
|
86102
|
+
access: "view"
|
|
86103
|
+
},
|
|
85837
86104
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
85838
86105
|
capName: "pipeline-analytics",
|
|
85839
86106
|
capScope: "device",
|
|
@@ -85852,6 +86119,12 @@ Object.freeze({
|
|
|
85852
86119
|
addonId: null,
|
|
85853
86120
|
access: "view"
|
|
85854
86121
|
},
|
|
86122
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
86123
|
+
capName: "pipeline-analytics",
|
|
86124
|
+
capScope: "device",
|
|
86125
|
+
addonId: null,
|
|
86126
|
+
access: "view"
|
|
86127
|
+
},
|
|
85855
86128
|
"pipelineAnalytics.getMotionEvents": {
|
|
85856
86129
|
capName: "pipeline-analytics",
|
|
85857
86130
|
capScope: "device",
|
|
@@ -87028,6 +87301,12 @@ Object.freeze({
|
|
|
87028
87301
|
addonId: null,
|
|
87029
87302
|
access: "view"
|
|
87030
87303
|
},
|
|
87304
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
87305
|
+
capName: "recording",
|
|
87306
|
+
capScope: "system",
|
|
87307
|
+
addonId: null,
|
|
87308
|
+
access: "create"
|
|
87309
|
+
},
|
|
87031
87310
|
"recording.refreshStorageLocationsForMigration": {
|
|
87032
87311
|
capName: "recording",
|
|
87033
87312
|
capScope: "system",
|
|
@@ -87154,6 +87433,12 @@ Object.freeze({
|
|
|
87154
87433
|
addonId: null,
|
|
87155
87434
|
access: "view"
|
|
87156
87435
|
},
|
|
87436
|
+
"sceneMonitor.listScenesBatch": {
|
|
87437
|
+
capName: "scene-monitor",
|
|
87438
|
+
capScope: "device",
|
|
87439
|
+
addonId: null,
|
|
87440
|
+
access: "view"
|
|
87441
|
+
},
|
|
87157
87442
|
"sceneMonitor.recheckNow": {
|
|
87158
87443
|
capName: "scene-monitor",
|
|
87159
87444
|
capScope: "device",
|
|
@@ -88510,6 +88795,12 @@ Object.freeze({
|
|
|
88510
88795
|
addonId: null,
|
|
88511
88796
|
access: "view"
|
|
88512
88797
|
},
|
|
88798
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
88799
|
+
capName: "zone-analytics",
|
|
88800
|
+
capScope: "device",
|
|
88801
|
+
addonId: null,
|
|
88802
|
+
access: "view"
|
|
88803
|
+
},
|
|
88513
88804
|
"zoneAnalytics.getUnzonedHistory": {
|
|
88514
88805
|
capName: "zone-analytics",
|
|
88515
88806
|
capScope: "device",
|
|
@@ -89499,6 +89790,11 @@ Object.freeze({
|
|
|
89499
89790
|
form: "single",
|
|
89500
89791
|
optional: false
|
|
89501
89792
|
}],
|
|
89793
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
89794
|
+
name: "deviceId",
|
|
89795
|
+
form: "single",
|
|
89796
|
+
optional: true
|
|
89797
|
+
}],
|
|
89502
89798
|
"pipelineAnalytics.getGroup": [{
|
|
89503
89799
|
name: "deviceId",
|
|
89504
89800
|
form: "single",
|
|
@@ -89509,6 +89805,11 @@ Object.freeze({
|
|
|
89509
89805
|
form: "single",
|
|
89510
89806
|
optional: false
|
|
89511
89807
|
}],
|
|
89808
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
89809
|
+
name: "deviceIds",
|
|
89810
|
+
form: "array",
|
|
89811
|
+
optional: false
|
|
89812
|
+
}],
|
|
89512
89813
|
"pipelineAnalytics.getMotionEvents": [{
|
|
89513
89814
|
name: "deviceId",
|
|
89514
89815
|
form: "single",
|
|
@@ -89949,6 +90250,11 @@ Object.freeze({
|
|
|
89949
90250
|
form: "single",
|
|
89950
90251
|
optional: false
|
|
89951
90252
|
}],
|
|
90253
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
90254
|
+
name: "deviceId",
|
|
90255
|
+
form: "single",
|
|
90256
|
+
optional: true
|
|
90257
|
+
}],
|
|
89952
90258
|
"recording.relocateFootage": [{
|
|
89953
90259
|
name: "deviceId",
|
|
89954
90260
|
form: "single",
|
|
@@ -90014,6 +90320,11 @@ Object.freeze({
|
|
|
90014
90320
|
form: "single",
|
|
90015
90321
|
optional: false
|
|
90016
90322
|
}],
|
|
90323
|
+
"sceneMonitor.listScenesBatch": [{
|
|
90324
|
+
name: "deviceIds",
|
|
90325
|
+
form: "array",
|
|
90326
|
+
optional: false
|
|
90327
|
+
}],
|
|
90017
90328
|
"sceneMonitor.recheckNow": [{
|
|
90018
90329
|
name: "deviceId",
|
|
90019
90330
|
form: "single",
|
|
@@ -90275,6 +90586,11 @@ Object.freeze({
|
|
|
90275
90586
|
form: "single",
|
|
90276
90587
|
optional: false
|
|
90277
90588
|
}],
|
|
90589
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
90590
|
+
name: "deviceIds",
|
|
90591
|
+
form: "array",
|
|
90592
|
+
optional: false
|
|
90593
|
+
}],
|
|
90278
90594
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
90279
90595
|
name: "deviceId",
|
|
90280
90596
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|