@camstack/addon-provider-dreo 0.2.48 → 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 CHANGED
@@ -8054,6 +8054,20 @@ var RelocateJobSchema = object({
8054
8054
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8055
8055
  */
8056
8056
  rowsReconciled: number().int().nonnegative().optional(),
8057
+ /**
8058
+ * Rows this run FORGOT because the file they name is not on disk.
8059
+ *
8060
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8061
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8062
+ * and the durable row is dropped through the same channel eviction uses. It
8063
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8064
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8065
+ * the same failure as one that quietly skips them (D295).
8066
+ *
8067
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8068
+ * ledger claimed 5.65 GB of footage that no longer existed.
8069
+ */
8070
+ rowsForgotten: number().int().nonnegative().optional(),
8057
8071
  startedAt: number(),
8058
8072
  finishedAt: number().nullable(),
8059
8073
  error: string().nullable()
@@ -8417,6 +8431,91 @@ var RelocateResidueSchema = object({
8417
8431
  segments: number().int().nonnegative(),
8418
8432
  bytes: number().int().nonnegative()
8419
8433
  }).nullable();
8434
+ /**
8435
+ * Ask one location whether its durable hour rows describe the disk — the walk
8436
+ * (D319).
8437
+ *
8438
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8439
+ * missing tool is the question, and the dry run is how they sanity-check the
8440
+ * destructive run before authorising it.
8441
+ */
8442
+ var LedgerWalkInputSchema = object({
8443
+ locationId: string().min(1),
8444
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8445
+ apply: boolean().optional(),
8446
+ /** Narrow to one camera. */
8447
+ deviceId: number().int().positive().optional(),
8448
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8449
+ profiles: array(string().min(1)).optional()
8450
+ });
8451
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8452
+ var LedgerWalkRefusalSchema = _enum([
8453
+ "location-unknown",
8454
+ "source-writable",
8455
+ "no-ledger",
8456
+ "archive-unreadable",
8457
+ "anchor-absent",
8458
+ "anchor-unreadable",
8459
+ "anchor-moved"
8460
+ ]);
8461
+ _enum([
8462
+ "live-tail",
8463
+ "listing-error",
8464
+ "path-mismatch",
8465
+ "durable-refused"
8466
+ ]);
8467
+ /** Every skip reason, always present, always a number — so a reason that never
8468
+ * fired reports as zero rather than absent and the report shape is constant
8469
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8470
+ var LedgerWalkSkipCountsSchema = object({
8471
+ "live-tail": number().int().nonnegative(),
8472
+ "listing-error": number().int().nonnegative(),
8473
+ "path-mismatch": number().int().nonnegative(),
8474
+ "durable-refused": number().int().nonnegative()
8475
+ });
8476
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8477
+ var LedgerWalkDeviceReportSchema = object({
8478
+ deviceId: number().int(),
8479
+ hoursWalked: number().int().nonnegative(),
8480
+ hoursMissing: number().int().nonnegative(),
8481
+ ghostSegments: number().int().nonnegative(),
8482
+ ghostBytes: number().int().nonnegative(),
8483
+ forgottenSegments: number().int().nonnegative(),
8484
+ orphanFiles: number().int().nonnegative()
8485
+ });
8486
+ /**
8487
+ * What one walk claimed, listed, found and (only when armed) forgot.
8488
+ *
8489
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8490
+ * walk that saw a fraction of the location is visible in its own report rather
8491
+ * than in the absence of one.
8492
+ */
8493
+ var LedgerWalkReportSchema = object({
8494
+ locationId: string(),
8495
+ applied: boolean(),
8496
+ refused: LedgerWalkRefusalSchema.nullable(),
8497
+ archiveSegments: number().int().nonnegative().nullable(),
8498
+ archiveBytes: number().int().nonnegative().nullable(),
8499
+ hoursClaimed: number().int().nonnegative(),
8500
+ hoursWalked: number().int().nonnegative(),
8501
+ hoursMissing: number().int().nonnegative(),
8502
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8503
+ listings: number().int().nonnegative(),
8504
+ segmentsClaimed: number().int().nonnegative(),
8505
+ ghostSegments: number().int().nonnegative(),
8506
+ ghostBytes: number().int().nonnegative(),
8507
+ ghostHoursWhole: number().int().nonnegative(),
8508
+ forgottenSegments: number().int().nonnegative(),
8509
+ forgottenBytes: number().int().nonnegative(),
8510
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8511
+ orphanFiles: number().int().nonnegative(),
8512
+ orphanSample: array(string()).readonly(),
8513
+ hoursSkipped: number().int().nonnegative(),
8514
+ skippedByReason: LedgerWalkSkipCountsSchema,
8515
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8516
+ bounded: boolean(),
8517
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8518
+ });
8420
8519
  /** How many rows a media pass would still act on against a given target — the
8421
8520
  * media lane's denominator AND its residue, from ONE derivation so the two can
8422
8521
  * never disagree. `null` = the count could not be taken. */
@@ -19049,13 +19148,15 @@ var ListGroupsPageSchema = object({
19049
19148
  groups: array(AnalyticsGroupRecordSchema).readonly(),
19050
19149
  nextCursor: string().nullable()
19051
19150
  });
19151
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19152
+ var KEY_EVENTS_MAX_LIMIT = 200;
19052
19153
  var KeyEventQueryInput = object({
19053
19154
  deviceId: number(),
19054
19155
  /** Window lower bound (track firstSeen ≥ since). */
19055
19156
  since: number(),
19056
19157
  /** Window upper bound (track firstSeen ≤ until). */
19057
19158
  until: number(),
19058
- limit: number().int().min(1).max(200).default(50),
19159
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19059
19160
  /** Drop tracks scoring below this importance. */
19060
19161
  minImportance: number().min(0).max(1).optional(),
19061
19162
  /** Restrict to a single class (e.g. 'person'). */
@@ -19077,6 +19178,32 @@ var KeyEventSchema = object({
19077
19178
  ...TrackFlagFields,
19078
19179
  ...TrackRetrainFields
19079
19180
  });
19181
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19182
+ var KeyEventBatchQueryInput = object({
19183
+ deviceIds: array(number()).min(1).max(200),
19184
+ since: number(),
19185
+ until: number(),
19186
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19187
+ * across the set, which would let a busy camera starve a quiet one of its
19188
+ * rows and change what the merged feed contains. */
19189
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19190
+ minImportance: number().min(0).max(1).optional(),
19191
+ classFilter: string().optional()
19192
+ });
19193
+ /**
19194
+ * One camera's key events in a batch answer.
19195
+ *
19196
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19197
+ * error rather than throwing, so a camera whose store read failed and one with
19198
+ * no events in the window were ALREADY indistinguishable per camera — the
19199
+ * batch does not make that worse, and the row keeps the deviceId the single
19200
+ * method's output never carried (the caller used to stamp it from the fan-out
19201
+ * key, which only worked because there was one query per camera).
19202
+ */
19203
+ var KeyEventsForDeviceSchema = object({
19204
+ deviceId: number(),
19205
+ events: array(KeyEventSchema).readonly()
19206
+ });
19080
19207
  object({
19081
19208
  trackId: string(),
19082
19209
  className: string(),
@@ -19346,7 +19473,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19346
19473
  until: number().optional(),
19347
19474
  kinds: array(string()).optional(),
19348
19475
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19349
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19476
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19350
19477
  deviceId: number(),
19351
19478
  since: number(),
19352
19479
  until: number(),
@@ -28721,6 +28848,9 @@ method(object({
28721
28848
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28722
28849
  kind: "query",
28723
28850
  auth: "admin"
28851
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28852
+ kind: "mutation",
28853
+ auth: "admin"
28724
28854
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28725
28855
  kind: "mutation",
28726
28856
  auth: "admin"
@@ -29112,6 +29242,25 @@ var SceneMonitorStatusSchema = object({
29112
29242
  monitors: array(SceneMonitorSchema),
29113
29243
  lastFetchedAt: number()
29114
29244
  });
29245
+ /**
29246
+ * One camera's row in a `listScenesBatch` answer.
29247
+ *
29248
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29249
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29250
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29251
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29252
+ * configured. Fanned out per camera the difference was visible — one query
29253
+ * errored while the others resolved — and a batch that returned only the rows
29254
+ * it managed would have destroyed it, silently, by making an unreachable camera
29255
+ * indistinguishable from one that answered `monitors: []`.
29256
+ *
29257
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29258
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29259
+ */
29260
+ var SceneMonitorStatusForDeviceSchema = object({
29261
+ deviceId: number(),
29262
+ status: SceneMonitorStatusSchema.nullable()
29263
+ });
29115
29264
  var sceneMonitorCapability = {
29116
29265
  name: "scene-monitor",
29117
29266
  scope: "device",
@@ -29121,6 +29270,22 @@ var sceneMonitorCapability = {
29121
29270
  deviceTypes: [DeviceType.Camera],
29122
29271
  methods: {
29123
29272
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29273
+ /**
29274
+ * The same answer, for a SET of cameras, in one round trip.
29275
+ *
29276
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29277
+ * poll behind the push slice. Fanned out client-side that was one query
29278
+ * per camera — 29 round trips through the browser, the hub and the
29279
+ * post-analysis runner every 30 seconds to read an in-memory map the
29280
+ * owner had already merged. The work is unchanged (`statusFor` per
29281
+ * device, all in-process at the owner); what collapses is the transport.
29282
+ *
29283
+ * A camera that cannot answer still gets a row, with `status: null` —
29284
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29285
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29286
+ * tell which two are missing, or that any are.
29287
+ */
29288
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29124
29289
  createScene: method(object({
29125
29290
  deviceId: number(),
29126
29291
  label: string(),
@@ -30956,6 +31121,27 @@ var CameraOccupancySnapshotSchema = object({
30956
31121
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30957
31122
  });
30958
31123
  /**
31124
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31125
+ *
31126
+ * THREE outcomes, and the single-camera method could only express two of them
31127
+ * because `snapshot: null` was already spoken for:
31128
+ *
31129
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31130
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31131
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31132
+ * - `read: 'unreadable'` — the owner could not answer for this
31133
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31134
+ *
31135
+ * Collapsing the last two is the failure this field exists to prevent: a
31136
+ * hydration that threw would otherwise render as an empty Stationary section,
31137
+ * which is a definite claim about a camera nobody could read.
31138
+ */
31139
+ var CameraOccupancySnapshotForDeviceSchema = object({
31140
+ deviceId: number(),
31141
+ read: _enum(["read", "unreadable"]),
31142
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31143
+ });
31144
+ /**
30959
31145
  * Time-series resolution. The history methods return one bucket per
30960
31146
  * step over the requested range. Smaller resolutions cost more
30961
31147
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -31012,6 +31198,20 @@ var zoneAnalyticsCapability = {
31012
31198
  * (no inference result emitted since boot or since binding was
31013
31199
  * activated). */
31014
31200
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31201
+ /**
31202
+ * The same snapshot, for a SET of cameras, in one round trip.
31203
+ *
31204
+ * The Events page's Stationary section polls this every 15s for every
31205
+ * selected camera. Fanned out client-side that is one query per camera to
31206
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31207
+ * costs everything. Batched, N transports become one and the per-device
31208
+ * work is unchanged.
31209
+ *
31210
+ * Every requested deviceId gets a row, tagged `read` — see
31211
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31212
+ * not answer for is `'unreadable'`, never an empty reading.
31213
+ */
31214
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
31015
31215
  /** Time-series object count inside one zone. `className` optional —
31016
31216
  * omit to count every class in the zone. */
31017
31217
  getZoneHistory: method(object({
@@ -35433,6 +35633,12 @@ Object.freeze({
35433
35633
  addonId: null,
35434
35634
  access: "view"
35435
35635
  },
35636
+ "pipelineAnalytics.getKeyEventsBatch": {
35637
+ capName: "pipeline-analytics",
35638
+ capScope: "device",
35639
+ addonId: null,
35640
+ access: "view"
35641
+ },
35436
35642
  "pipelineAnalytics.getMotionEvents": {
35437
35643
  capName: "pipeline-analytics",
35438
35644
  capScope: "device",
@@ -36609,6 +36815,12 @@ Object.freeze({
36609
36815
  addonId: null,
36610
36816
  access: "view"
36611
36817
  },
36818
+ "recording.reconcileLedgerAgainstDisk": {
36819
+ capName: "recording",
36820
+ capScope: "system",
36821
+ addonId: null,
36822
+ access: "create"
36823
+ },
36612
36824
  "recording.refreshStorageLocationsForMigration": {
36613
36825
  capName: "recording",
36614
36826
  capScope: "system",
@@ -36735,6 +36947,12 @@ Object.freeze({
36735
36947
  addonId: null,
36736
36948
  access: "view"
36737
36949
  },
36950
+ "sceneMonitor.listScenesBatch": {
36951
+ capName: "scene-monitor",
36952
+ capScope: "device",
36953
+ addonId: null,
36954
+ access: "view"
36955
+ },
36738
36956
  "sceneMonitor.recheckNow": {
36739
36957
  capName: "scene-monitor",
36740
36958
  capScope: "device",
@@ -38091,6 +38309,12 @@ Object.freeze({
38091
38309
  addonId: null,
38092
38310
  access: "view"
38093
38311
  },
38312
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38313
+ capName: "zone-analytics",
38314
+ capScope: "device",
38315
+ addonId: null,
38316
+ access: "view"
38317
+ },
38094
38318
  "zoneAnalytics.getUnzonedHistory": {
38095
38319
  capName: "zone-analytics",
38096
38320
  capScope: "device",
@@ -39095,6 +39319,11 @@ Object.freeze({
39095
39319
  form: "single",
39096
39320
  optional: false
39097
39321
  }],
39322
+ "pipelineAnalytics.getKeyEventsBatch": [{
39323
+ name: "deviceIds",
39324
+ form: "array",
39325
+ optional: false
39326
+ }],
39098
39327
  "pipelineAnalytics.getMotionEvents": [{
39099
39328
  name: "deviceId",
39100
39329
  form: "single",
@@ -39535,6 +39764,11 @@ Object.freeze({
39535
39764
  form: "single",
39536
39765
  optional: false
39537
39766
  }],
39767
+ "recording.reconcileLedgerAgainstDisk": [{
39768
+ name: "deviceId",
39769
+ form: "single",
39770
+ optional: true
39771
+ }],
39538
39772
  "recording.relocateFootage": [{
39539
39773
  name: "deviceId",
39540
39774
  form: "single",
@@ -39600,6 +39834,11 @@ Object.freeze({
39600
39834
  form: "single",
39601
39835
  optional: false
39602
39836
  }],
39837
+ "sceneMonitor.listScenesBatch": [{
39838
+ name: "deviceIds",
39839
+ form: "array",
39840
+ optional: false
39841
+ }],
39603
39842
  "sceneMonitor.recheckNow": [{
39604
39843
  name: "deviceId",
39605
39844
  form: "single",
@@ -39861,6 +40100,11 @@ Object.freeze({
39861
40100
  form: "single",
39862
40101
  optional: false
39863
40102
  }],
40103
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40104
+ name: "deviceIds",
40105
+ form: "array",
40106
+ optional: false
40107
+ }],
39864
40108
  "zoneAnalytics.getUnzonedHistory": [{
39865
40109
  name: "deviceId",
39866
40110
  form: "single",
package/dist/addon.mjs CHANGED
@@ -8055,6 +8055,20 @@ var RelocateJobSchema = object({
8055
8055
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8056
8056
  */
8057
8057
  rowsReconciled: number().int().nonnegative().optional(),
8058
+ /**
8059
+ * Rows this run FORGOT because the file they name is not on disk.
8060
+ *
8061
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8062
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8063
+ * and the durable row is dropped through the same channel eviction uses. It
8064
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8065
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8066
+ * the same failure as one that quietly skips them (D295).
8067
+ *
8068
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8069
+ * ledger claimed 5.65 GB of footage that no longer existed.
8070
+ */
8071
+ rowsForgotten: number().int().nonnegative().optional(),
8058
8072
  startedAt: number(),
8059
8073
  finishedAt: number().nullable(),
8060
8074
  error: string().nullable()
@@ -8418,6 +8432,91 @@ var RelocateResidueSchema = object({
8418
8432
  segments: number().int().nonnegative(),
8419
8433
  bytes: number().int().nonnegative()
8420
8434
  }).nullable();
8435
+ /**
8436
+ * Ask one location whether its durable hour rows describe the disk — the walk
8437
+ * (D319).
8438
+ *
8439
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8440
+ * missing tool is the question, and the dry run is how they sanity-check the
8441
+ * destructive run before authorising it.
8442
+ */
8443
+ var LedgerWalkInputSchema = object({
8444
+ locationId: string().min(1),
8445
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8446
+ apply: boolean().optional(),
8447
+ /** Narrow to one camera. */
8448
+ deviceId: number().int().positive().optional(),
8449
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8450
+ profiles: array(string().min(1)).optional()
8451
+ });
8452
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8453
+ var LedgerWalkRefusalSchema = _enum([
8454
+ "location-unknown",
8455
+ "source-writable",
8456
+ "no-ledger",
8457
+ "archive-unreadable",
8458
+ "anchor-absent",
8459
+ "anchor-unreadable",
8460
+ "anchor-moved"
8461
+ ]);
8462
+ _enum([
8463
+ "live-tail",
8464
+ "listing-error",
8465
+ "path-mismatch",
8466
+ "durable-refused"
8467
+ ]);
8468
+ /** Every skip reason, always present, always a number — so a reason that never
8469
+ * fired reports as zero rather than absent and the report shape is constant
8470
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8471
+ var LedgerWalkSkipCountsSchema = object({
8472
+ "live-tail": number().int().nonnegative(),
8473
+ "listing-error": number().int().nonnegative(),
8474
+ "path-mismatch": number().int().nonnegative(),
8475
+ "durable-refused": number().int().nonnegative()
8476
+ });
8477
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8478
+ var LedgerWalkDeviceReportSchema = object({
8479
+ deviceId: number().int(),
8480
+ hoursWalked: number().int().nonnegative(),
8481
+ hoursMissing: number().int().nonnegative(),
8482
+ ghostSegments: number().int().nonnegative(),
8483
+ ghostBytes: number().int().nonnegative(),
8484
+ forgottenSegments: number().int().nonnegative(),
8485
+ orphanFiles: number().int().nonnegative()
8486
+ });
8487
+ /**
8488
+ * What one walk claimed, listed, found and (only when armed) forgot.
8489
+ *
8490
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8491
+ * walk that saw a fraction of the location is visible in its own report rather
8492
+ * than in the absence of one.
8493
+ */
8494
+ var LedgerWalkReportSchema = object({
8495
+ locationId: string(),
8496
+ applied: boolean(),
8497
+ refused: LedgerWalkRefusalSchema.nullable(),
8498
+ archiveSegments: number().int().nonnegative().nullable(),
8499
+ archiveBytes: number().int().nonnegative().nullable(),
8500
+ hoursClaimed: number().int().nonnegative(),
8501
+ hoursWalked: number().int().nonnegative(),
8502
+ hoursMissing: number().int().nonnegative(),
8503
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8504
+ listings: number().int().nonnegative(),
8505
+ segmentsClaimed: number().int().nonnegative(),
8506
+ ghostSegments: number().int().nonnegative(),
8507
+ ghostBytes: number().int().nonnegative(),
8508
+ ghostHoursWhole: number().int().nonnegative(),
8509
+ forgottenSegments: number().int().nonnegative(),
8510
+ forgottenBytes: number().int().nonnegative(),
8511
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8512
+ orphanFiles: number().int().nonnegative(),
8513
+ orphanSample: array(string()).readonly(),
8514
+ hoursSkipped: number().int().nonnegative(),
8515
+ skippedByReason: LedgerWalkSkipCountsSchema,
8516
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8517
+ bounded: boolean(),
8518
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8519
+ });
8421
8520
  /** How many rows a media pass would still act on against a given target — the
8422
8521
  * media lane's denominator AND its residue, from ONE derivation so the two can
8423
8522
  * never disagree. `null` = the count could not be taken. */
@@ -19050,13 +19149,15 @@ var ListGroupsPageSchema = object({
19050
19149
  groups: array(AnalyticsGroupRecordSchema).readonly(),
19051
19150
  nextCursor: string().nullable()
19052
19151
  });
19152
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19153
+ var KEY_EVENTS_MAX_LIMIT = 200;
19053
19154
  var KeyEventQueryInput = object({
19054
19155
  deviceId: number(),
19055
19156
  /** Window lower bound (track firstSeen ≥ since). */
19056
19157
  since: number(),
19057
19158
  /** Window upper bound (track firstSeen ≤ until). */
19058
19159
  until: number(),
19059
- limit: number().int().min(1).max(200).default(50),
19160
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19060
19161
  /** Drop tracks scoring below this importance. */
19061
19162
  minImportance: number().min(0).max(1).optional(),
19062
19163
  /** Restrict to a single class (e.g. 'person'). */
@@ -19078,6 +19179,32 @@ var KeyEventSchema = object({
19078
19179
  ...TrackFlagFields,
19079
19180
  ...TrackRetrainFields
19080
19181
  });
19182
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19183
+ var KeyEventBatchQueryInput = object({
19184
+ deviceIds: array(number()).min(1).max(200),
19185
+ since: number(),
19186
+ until: number(),
19187
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19188
+ * across the set, which would let a busy camera starve a quiet one of its
19189
+ * rows and change what the merged feed contains. */
19190
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19191
+ minImportance: number().min(0).max(1).optional(),
19192
+ classFilter: string().optional()
19193
+ });
19194
+ /**
19195
+ * One camera's key events in a batch answer.
19196
+ *
19197
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19198
+ * error rather than throwing, so a camera whose store read failed and one with
19199
+ * no events in the window were ALREADY indistinguishable per camera — the
19200
+ * batch does not make that worse, and the row keeps the deviceId the single
19201
+ * method's output never carried (the caller used to stamp it from the fan-out
19202
+ * key, which only worked because there was one query per camera).
19203
+ */
19204
+ var KeyEventsForDeviceSchema = object({
19205
+ deviceId: number(),
19206
+ events: array(KeyEventSchema).readonly()
19207
+ });
19081
19208
  object({
19082
19209
  trackId: string(),
19083
19210
  className: string(),
@@ -19347,7 +19474,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19347
19474
  until: number().optional(),
19348
19475
  kinds: array(string()).optional(),
19349
19476
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19350
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19477
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19351
19478
  deviceId: number(),
19352
19479
  since: number(),
19353
19480
  until: number(),
@@ -28722,6 +28849,9 @@ method(object({
28722
28849
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28723
28850
  kind: "query",
28724
28851
  auth: "admin"
28852
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28853
+ kind: "mutation",
28854
+ auth: "admin"
28725
28855
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28726
28856
  kind: "mutation",
28727
28857
  auth: "admin"
@@ -29113,6 +29243,25 @@ var SceneMonitorStatusSchema = object({
29113
29243
  monitors: array(SceneMonitorSchema),
29114
29244
  lastFetchedAt: number()
29115
29245
  });
29246
+ /**
29247
+ * One camera's row in a `listScenesBatch` answer.
29248
+ *
29249
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29250
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29251
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29252
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29253
+ * configured. Fanned out per camera the difference was visible — one query
29254
+ * errored while the others resolved — and a batch that returned only the rows
29255
+ * it managed would have destroyed it, silently, by making an unreachable camera
29256
+ * indistinguishable from one that answered `monitors: []`.
29257
+ *
29258
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29259
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29260
+ */
29261
+ var SceneMonitorStatusForDeviceSchema = object({
29262
+ deviceId: number(),
29263
+ status: SceneMonitorStatusSchema.nullable()
29264
+ });
29116
29265
  var sceneMonitorCapability = {
29117
29266
  name: "scene-monitor",
29118
29267
  scope: "device",
@@ -29122,6 +29271,22 @@ var sceneMonitorCapability = {
29122
29271
  deviceTypes: [DeviceType.Camera],
29123
29272
  methods: {
29124
29273
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29274
+ /**
29275
+ * The same answer, for a SET of cameras, in one round trip.
29276
+ *
29277
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29278
+ * poll behind the push slice. Fanned out client-side that was one query
29279
+ * per camera — 29 round trips through the browser, the hub and the
29280
+ * post-analysis runner every 30 seconds to read an in-memory map the
29281
+ * owner had already merged. The work is unchanged (`statusFor` per
29282
+ * device, all in-process at the owner); what collapses is the transport.
29283
+ *
29284
+ * A camera that cannot answer still gets a row, with `status: null` —
29285
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29286
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29287
+ * tell which two are missing, or that any are.
29288
+ */
29289
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29125
29290
  createScene: method(object({
29126
29291
  deviceId: number(),
29127
29292
  label: string(),
@@ -30957,6 +31122,27 @@ var CameraOccupancySnapshotSchema = object({
30957
31122
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30958
31123
  });
30959
31124
  /**
31125
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31126
+ *
31127
+ * THREE outcomes, and the single-camera method could only express two of them
31128
+ * because `snapshot: null` was already spoken for:
31129
+ *
31130
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31131
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31132
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31133
+ * - `read: 'unreadable'` — the owner could not answer for this
31134
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31135
+ *
31136
+ * Collapsing the last two is the failure this field exists to prevent: a
31137
+ * hydration that threw would otherwise render as an empty Stationary section,
31138
+ * which is a definite claim about a camera nobody could read.
31139
+ */
31140
+ var CameraOccupancySnapshotForDeviceSchema = object({
31141
+ deviceId: number(),
31142
+ read: _enum(["read", "unreadable"]),
31143
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31144
+ });
31145
+ /**
30960
31146
  * Time-series resolution. The history methods return one bucket per
30961
31147
  * step over the requested range. Smaller resolutions cost more
30962
31148
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -31013,6 +31199,20 @@ var zoneAnalyticsCapability = {
31013
31199
  * (no inference result emitted since boot or since binding was
31014
31200
  * activated). */
31015
31201
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31202
+ /**
31203
+ * The same snapshot, for a SET of cameras, in one round trip.
31204
+ *
31205
+ * The Events page's Stationary section polls this every 15s for every
31206
+ * selected camera. Fanned out client-side that is one query per camera to
31207
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31208
+ * costs everything. Batched, N transports become one and the per-device
31209
+ * work is unchanged.
31210
+ *
31211
+ * Every requested deviceId gets a row, tagged `read` — see
31212
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31213
+ * not answer for is `'unreadable'`, never an empty reading.
31214
+ */
31215
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
31016
31216
  /** Time-series object count inside one zone. `className` optional —
31017
31217
  * omit to count every class in the zone. */
31018
31218
  getZoneHistory: method(object({
@@ -35434,6 +35634,12 @@ Object.freeze({
35434
35634
  addonId: null,
35435
35635
  access: "view"
35436
35636
  },
35637
+ "pipelineAnalytics.getKeyEventsBatch": {
35638
+ capName: "pipeline-analytics",
35639
+ capScope: "device",
35640
+ addonId: null,
35641
+ access: "view"
35642
+ },
35437
35643
  "pipelineAnalytics.getMotionEvents": {
35438
35644
  capName: "pipeline-analytics",
35439
35645
  capScope: "device",
@@ -36610,6 +36816,12 @@ Object.freeze({
36610
36816
  addonId: null,
36611
36817
  access: "view"
36612
36818
  },
36819
+ "recording.reconcileLedgerAgainstDisk": {
36820
+ capName: "recording",
36821
+ capScope: "system",
36822
+ addonId: null,
36823
+ access: "create"
36824
+ },
36613
36825
  "recording.refreshStorageLocationsForMigration": {
36614
36826
  capName: "recording",
36615
36827
  capScope: "system",
@@ -36736,6 +36948,12 @@ Object.freeze({
36736
36948
  addonId: null,
36737
36949
  access: "view"
36738
36950
  },
36951
+ "sceneMonitor.listScenesBatch": {
36952
+ capName: "scene-monitor",
36953
+ capScope: "device",
36954
+ addonId: null,
36955
+ access: "view"
36956
+ },
36739
36957
  "sceneMonitor.recheckNow": {
36740
36958
  capName: "scene-monitor",
36741
36959
  capScope: "device",
@@ -38092,6 +38310,12 @@ Object.freeze({
38092
38310
  addonId: null,
38093
38311
  access: "view"
38094
38312
  },
38313
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38314
+ capName: "zone-analytics",
38315
+ capScope: "device",
38316
+ addonId: null,
38317
+ access: "view"
38318
+ },
38095
38319
  "zoneAnalytics.getUnzonedHistory": {
38096
38320
  capName: "zone-analytics",
38097
38321
  capScope: "device",
@@ -39096,6 +39320,11 @@ Object.freeze({
39096
39320
  form: "single",
39097
39321
  optional: false
39098
39322
  }],
39323
+ "pipelineAnalytics.getKeyEventsBatch": [{
39324
+ name: "deviceIds",
39325
+ form: "array",
39326
+ optional: false
39327
+ }],
39099
39328
  "pipelineAnalytics.getMotionEvents": [{
39100
39329
  name: "deviceId",
39101
39330
  form: "single",
@@ -39536,6 +39765,11 @@ Object.freeze({
39536
39765
  form: "single",
39537
39766
  optional: false
39538
39767
  }],
39768
+ "recording.reconcileLedgerAgainstDisk": [{
39769
+ name: "deviceId",
39770
+ form: "single",
39771
+ optional: true
39772
+ }],
39539
39773
  "recording.relocateFootage": [{
39540
39774
  name: "deviceId",
39541
39775
  form: "single",
@@ -39601,6 +39835,11 @@ Object.freeze({
39601
39835
  form: "single",
39602
39836
  optional: false
39603
39837
  }],
39838
+ "sceneMonitor.listScenesBatch": [{
39839
+ name: "deviceIds",
39840
+ form: "array",
39841
+ optional: false
39842
+ }],
39604
39843
  "sceneMonitor.recheckNow": [{
39605
39844
  name: "deviceId",
39606
39845
  form: "single",
@@ -39862,6 +40101,11 @@ Object.freeze({
39862
40101
  form: "single",
39863
40102
  optional: false
39864
40103
  }],
40104
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40105
+ name: "deviceIds",
40106
+ form: "array",
40107
+ optional: false
40108
+ }],
39865
40109
  "zoneAnalytics.getUnzonedHistory": [{
39866
40110
  name: "deviceId",
39867
40111
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",