@camstack/addon-provider-velux 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
@@ -8018,6 +8018,20 @@ var RelocateJobSchema = object({
8018
8018
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8019
8019
  */
8020
8020
  rowsReconciled: number().int().nonnegative().optional(),
8021
+ /**
8022
+ * Rows this run FORGOT because the file they name is not on disk.
8023
+ *
8024
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8025
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8026
+ * and the durable row is dropped through the same channel eviction uses. It
8027
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8028
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8029
+ * the same failure as one that quietly skips them (D295).
8030
+ *
8031
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8032
+ * ledger claimed 5.65 GB of footage that no longer existed.
8033
+ */
8034
+ rowsForgotten: number().int().nonnegative().optional(),
8021
8035
  startedAt: number(),
8022
8036
  finishedAt: number().nullable(),
8023
8037
  error: string().nullable()
@@ -8381,6 +8395,91 @@ var RelocateResidueSchema = object({
8381
8395
  segments: number().int().nonnegative(),
8382
8396
  bytes: number().int().nonnegative()
8383
8397
  }).nullable();
8398
+ /**
8399
+ * Ask one location whether its durable hour rows describe the disk — the walk
8400
+ * (D319).
8401
+ *
8402
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8403
+ * missing tool is the question, and the dry run is how they sanity-check the
8404
+ * destructive run before authorising it.
8405
+ */
8406
+ var LedgerWalkInputSchema = object({
8407
+ locationId: string().min(1),
8408
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8409
+ apply: boolean().optional(),
8410
+ /** Narrow to one camera. */
8411
+ deviceId: number().int().positive().optional(),
8412
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8413
+ profiles: array(string().min(1)).optional()
8414
+ });
8415
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8416
+ var LedgerWalkRefusalSchema = _enum([
8417
+ "location-unknown",
8418
+ "source-writable",
8419
+ "no-ledger",
8420
+ "archive-unreadable",
8421
+ "anchor-absent",
8422
+ "anchor-unreadable",
8423
+ "anchor-moved"
8424
+ ]);
8425
+ _enum([
8426
+ "live-tail",
8427
+ "listing-error",
8428
+ "path-mismatch",
8429
+ "durable-refused"
8430
+ ]);
8431
+ /** Every skip reason, always present, always a number — so a reason that never
8432
+ * fired reports as zero rather than absent and the report shape is constant
8433
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8434
+ var LedgerWalkSkipCountsSchema = object({
8435
+ "live-tail": number().int().nonnegative(),
8436
+ "listing-error": number().int().nonnegative(),
8437
+ "path-mismatch": number().int().nonnegative(),
8438
+ "durable-refused": number().int().nonnegative()
8439
+ });
8440
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8441
+ var LedgerWalkDeviceReportSchema = object({
8442
+ deviceId: number().int(),
8443
+ hoursWalked: number().int().nonnegative(),
8444
+ hoursMissing: number().int().nonnegative(),
8445
+ ghostSegments: number().int().nonnegative(),
8446
+ ghostBytes: number().int().nonnegative(),
8447
+ forgottenSegments: number().int().nonnegative(),
8448
+ orphanFiles: number().int().nonnegative()
8449
+ });
8450
+ /**
8451
+ * What one walk claimed, listed, found and (only when armed) forgot.
8452
+ *
8453
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8454
+ * walk that saw a fraction of the location is visible in its own report rather
8455
+ * than in the absence of one.
8456
+ */
8457
+ var LedgerWalkReportSchema = object({
8458
+ locationId: string(),
8459
+ applied: boolean(),
8460
+ refused: LedgerWalkRefusalSchema.nullable(),
8461
+ archiveSegments: number().int().nonnegative().nullable(),
8462
+ archiveBytes: number().int().nonnegative().nullable(),
8463
+ hoursClaimed: number().int().nonnegative(),
8464
+ hoursWalked: number().int().nonnegative(),
8465
+ hoursMissing: number().int().nonnegative(),
8466
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8467
+ listings: number().int().nonnegative(),
8468
+ segmentsClaimed: number().int().nonnegative(),
8469
+ ghostSegments: number().int().nonnegative(),
8470
+ ghostBytes: number().int().nonnegative(),
8471
+ ghostHoursWhole: number().int().nonnegative(),
8472
+ forgottenSegments: number().int().nonnegative(),
8473
+ forgottenBytes: number().int().nonnegative(),
8474
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8475
+ orphanFiles: number().int().nonnegative(),
8476
+ orphanSample: array(string()).readonly(),
8477
+ hoursSkipped: number().int().nonnegative(),
8478
+ skippedByReason: LedgerWalkSkipCountsSchema,
8479
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8480
+ bounded: boolean(),
8481
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8482
+ });
8384
8483
  /** How many rows a media pass would still act on against a given target — the
8385
8484
  * media lane's denominator AND its residue, from ONE derivation so the two can
8386
8485
  * never disagree. `null` = the count could not be taken. */
@@ -18996,13 +19095,15 @@ var ListGroupsPageSchema = object({
18996
19095
  groups: array(AnalyticsGroupRecordSchema).readonly(),
18997
19096
  nextCursor: string().nullable()
18998
19097
  });
19098
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19099
+ var KEY_EVENTS_MAX_LIMIT = 200;
18999
19100
  var KeyEventQueryInput = object({
19000
19101
  deviceId: number(),
19001
19102
  /** Window lower bound (track firstSeen ≥ since). */
19002
19103
  since: number(),
19003
19104
  /** Window upper bound (track firstSeen ≤ until). */
19004
19105
  until: number(),
19005
- limit: number().int().min(1).max(200).default(50),
19106
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19006
19107
  /** Drop tracks scoring below this importance. */
19007
19108
  minImportance: number().min(0).max(1).optional(),
19008
19109
  /** Restrict to a single class (e.g. 'person'). */
@@ -19024,6 +19125,32 @@ var KeyEventSchema = object({
19024
19125
  ...TrackFlagFields,
19025
19126
  ...TrackRetrainFields
19026
19127
  });
19128
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19129
+ var KeyEventBatchQueryInput = object({
19130
+ deviceIds: array(number()).min(1).max(200),
19131
+ since: number(),
19132
+ until: number(),
19133
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19134
+ * across the set, which would let a busy camera starve a quiet one of its
19135
+ * rows and change what the merged feed contains. */
19136
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19137
+ minImportance: number().min(0).max(1).optional(),
19138
+ classFilter: string().optional()
19139
+ });
19140
+ /**
19141
+ * One camera's key events in a batch answer.
19142
+ *
19143
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19144
+ * error rather than throwing, so a camera whose store read failed and one with
19145
+ * no events in the window were ALREADY indistinguishable per camera — the
19146
+ * batch does not make that worse, and the row keeps the deviceId the single
19147
+ * method's output never carried (the caller used to stamp it from the fan-out
19148
+ * key, which only worked because there was one query per camera).
19149
+ */
19150
+ var KeyEventsForDeviceSchema = object({
19151
+ deviceId: number(),
19152
+ events: array(KeyEventSchema).readonly()
19153
+ });
19027
19154
  object({
19028
19155
  trackId: string(),
19029
19156
  className: string(),
@@ -19293,7 +19420,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19293
19420
  until: number().optional(),
19294
19421
  kinds: array(string()).optional(),
19295
19422
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19296
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19423
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19297
19424
  deviceId: number(),
19298
19425
  since: number(),
19299
19426
  until: number(),
@@ -28660,6 +28787,9 @@ method(object({
28660
28787
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28661
28788
  kind: "query",
28662
28789
  auth: "admin"
28790
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28791
+ kind: "mutation",
28792
+ auth: "admin"
28663
28793
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28664
28794
  kind: "mutation",
28665
28795
  auth: "admin"
@@ -29051,6 +29181,25 @@ var SceneMonitorStatusSchema = object({
29051
29181
  monitors: array(SceneMonitorSchema),
29052
29182
  lastFetchedAt: number()
29053
29183
  });
29184
+ /**
29185
+ * One camera's row in a `listScenesBatch` answer.
29186
+ *
29187
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29188
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29189
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29190
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29191
+ * configured. Fanned out per camera the difference was visible — one query
29192
+ * errored while the others resolved — and a batch that returned only the rows
29193
+ * it managed would have destroyed it, silently, by making an unreachable camera
29194
+ * indistinguishable from one that answered `monitors: []`.
29195
+ *
29196
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29197
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29198
+ */
29199
+ var SceneMonitorStatusForDeviceSchema = object({
29200
+ deviceId: number(),
29201
+ status: SceneMonitorStatusSchema.nullable()
29202
+ });
29054
29203
  var sceneMonitorCapability = {
29055
29204
  name: "scene-monitor",
29056
29205
  scope: "device",
@@ -29060,6 +29209,22 @@ var sceneMonitorCapability = {
29060
29209
  deviceTypes: [DeviceType.Camera],
29061
29210
  methods: {
29062
29211
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29212
+ /**
29213
+ * The same answer, for a SET of cameras, in one round trip.
29214
+ *
29215
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29216
+ * poll behind the push slice. Fanned out client-side that was one query
29217
+ * per camera — 29 round trips through the browser, the hub and the
29218
+ * post-analysis runner every 30 seconds to read an in-memory map the
29219
+ * owner had already merged. The work is unchanged (`statusFor` per
29220
+ * device, all in-process at the owner); what collapses is the transport.
29221
+ *
29222
+ * A camera that cannot answer still gets a row, with `status: null` —
29223
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29224
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29225
+ * tell which two are missing, or that any are.
29226
+ */
29227
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29063
29228
  createScene: method(object({
29064
29229
  deviceId: number(),
29065
29230
  label: string(),
@@ -30895,6 +31060,27 @@ var CameraOccupancySnapshotSchema = object({
30895
31060
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30896
31061
  });
30897
31062
  /**
31063
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31064
+ *
31065
+ * THREE outcomes, and the single-camera method could only express two of them
31066
+ * because `snapshot: null` was already spoken for:
31067
+ *
31068
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31069
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31070
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31071
+ * - `read: 'unreadable'` — the owner could not answer for this
31072
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31073
+ *
31074
+ * Collapsing the last two is the failure this field exists to prevent: a
31075
+ * hydration that threw would otherwise render as an empty Stationary section,
31076
+ * which is a definite claim about a camera nobody could read.
31077
+ */
31078
+ var CameraOccupancySnapshotForDeviceSchema = object({
31079
+ deviceId: number(),
31080
+ read: _enum(["read", "unreadable"]),
31081
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31082
+ });
31083
+ /**
30898
31084
  * Time-series resolution. The history methods return one bucket per
30899
31085
  * step over the requested range. Smaller resolutions cost more
30900
31086
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -30951,6 +31137,20 @@ var zoneAnalyticsCapability = {
30951
31137
  * (no inference result emitted since boot or since binding was
30952
31138
  * activated). */
30953
31139
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31140
+ /**
31141
+ * The same snapshot, for a SET of cameras, in one round trip.
31142
+ *
31143
+ * The Events page's Stationary section polls this every 15s for every
31144
+ * selected camera. Fanned out client-side that is one query per camera to
31145
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31146
+ * costs everything. Batched, N transports become one and the per-device
31147
+ * work is unchanged.
31148
+ *
31149
+ * Every requested deviceId gets a row, tagged `read` — see
31150
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31151
+ * not answer for is `'unreadable'`, never an empty reading.
31152
+ */
31153
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
30954
31154
  /** Time-series object count inside one zone. `className` optional —
30955
31155
  * omit to count every class in the zone. */
30956
31156
  getZoneHistory: method(object({
@@ -35372,6 +35572,12 @@ Object.freeze({
35372
35572
  addonId: null,
35373
35573
  access: "view"
35374
35574
  },
35575
+ "pipelineAnalytics.getKeyEventsBatch": {
35576
+ capName: "pipeline-analytics",
35577
+ capScope: "device",
35578
+ addonId: null,
35579
+ access: "view"
35580
+ },
35375
35581
  "pipelineAnalytics.getMotionEvents": {
35376
35582
  capName: "pipeline-analytics",
35377
35583
  capScope: "device",
@@ -36548,6 +36754,12 @@ Object.freeze({
36548
36754
  addonId: null,
36549
36755
  access: "view"
36550
36756
  },
36757
+ "recording.reconcileLedgerAgainstDisk": {
36758
+ capName: "recording",
36759
+ capScope: "system",
36760
+ addonId: null,
36761
+ access: "create"
36762
+ },
36551
36763
  "recording.refreshStorageLocationsForMigration": {
36552
36764
  capName: "recording",
36553
36765
  capScope: "system",
@@ -36674,6 +36886,12 @@ Object.freeze({
36674
36886
  addonId: null,
36675
36887
  access: "view"
36676
36888
  },
36889
+ "sceneMonitor.listScenesBatch": {
36890
+ capName: "scene-monitor",
36891
+ capScope: "device",
36892
+ addonId: null,
36893
+ access: "view"
36894
+ },
36677
36895
  "sceneMonitor.recheckNow": {
36678
36896
  capName: "scene-monitor",
36679
36897
  capScope: "device",
@@ -38030,6 +38248,12 @@ Object.freeze({
38030
38248
  addonId: null,
38031
38249
  access: "view"
38032
38250
  },
38251
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38252
+ capName: "zone-analytics",
38253
+ capScope: "device",
38254
+ addonId: null,
38255
+ access: "view"
38256
+ },
38033
38257
  "zoneAnalytics.getUnzonedHistory": {
38034
38258
  capName: "zone-analytics",
38035
38259
  capScope: "device",
@@ -39034,6 +39258,11 @@ Object.freeze({
39034
39258
  form: "single",
39035
39259
  optional: false
39036
39260
  }],
39261
+ "pipelineAnalytics.getKeyEventsBatch": [{
39262
+ name: "deviceIds",
39263
+ form: "array",
39264
+ optional: false
39265
+ }],
39037
39266
  "pipelineAnalytics.getMotionEvents": [{
39038
39267
  name: "deviceId",
39039
39268
  form: "single",
@@ -39474,6 +39703,11 @@ Object.freeze({
39474
39703
  form: "single",
39475
39704
  optional: false
39476
39705
  }],
39706
+ "recording.reconcileLedgerAgainstDisk": [{
39707
+ name: "deviceId",
39708
+ form: "single",
39709
+ optional: true
39710
+ }],
39477
39711
  "recording.relocateFootage": [{
39478
39712
  name: "deviceId",
39479
39713
  form: "single",
@@ -39539,6 +39773,11 @@ Object.freeze({
39539
39773
  form: "single",
39540
39774
  optional: false
39541
39775
  }],
39776
+ "sceneMonitor.listScenesBatch": [{
39777
+ name: "deviceIds",
39778
+ form: "array",
39779
+ optional: false
39780
+ }],
39542
39781
  "sceneMonitor.recheckNow": [{
39543
39782
  name: "deviceId",
39544
39783
  form: "single",
@@ -39800,6 +40039,11 @@ Object.freeze({
39800
40039
  form: "single",
39801
40040
  optional: false
39802
40041
  }],
40042
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40043
+ name: "deviceIds",
40044
+ form: "array",
40045
+ optional: false
40046
+ }],
39803
40047
  "zoneAnalytics.getUnzonedHistory": [{
39804
40048
  name: "deviceId",
39805
40049
  form: "single",
package/dist/addon.mjs CHANGED
@@ -8017,6 +8017,20 @@ var RelocateJobSchema = object({
8017
8017
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8018
8018
  */
8019
8019
  rowsReconciled: number().int().nonnegative().optional(),
8020
+ /**
8021
+ * Rows this run FORGOT because the file they name is not on disk.
8022
+ *
8023
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8024
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8025
+ * and the durable row is dropped through the same channel eviction uses. It
8026
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8027
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8028
+ * the same failure as one that quietly skips them (D295).
8029
+ *
8030
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8031
+ * ledger claimed 5.65 GB of footage that no longer existed.
8032
+ */
8033
+ rowsForgotten: number().int().nonnegative().optional(),
8020
8034
  startedAt: number(),
8021
8035
  finishedAt: number().nullable(),
8022
8036
  error: string().nullable()
@@ -8380,6 +8394,91 @@ var RelocateResidueSchema = object({
8380
8394
  segments: number().int().nonnegative(),
8381
8395
  bytes: number().int().nonnegative()
8382
8396
  }).nullable();
8397
+ /**
8398
+ * Ask one location whether its durable hour rows describe the disk — the walk
8399
+ * (D319).
8400
+ *
8401
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8402
+ * missing tool is the question, and the dry run is how they sanity-check the
8403
+ * destructive run before authorising it.
8404
+ */
8405
+ var LedgerWalkInputSchema = object({
8406
+ locationId: string().min(1),
8407
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8408
+ apply: boolean().optional(),
8409
+ /** Narrow to one camera. */
8410
+ deviceId: number().int().positive().optional(),
8411
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8412
+ profiles: array(string().min(1)).optional()
8413
+ });
8414
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8415
+ var LedgerWalkRefusalSchema = _enum([
8416
+ "location-unknown",
8417
+ "source-writable",
8418
+ "no-ledger",
8419
+ "archive-unreadable",
8420
+ "anchor-absent",
8421
+ "anchor-unreadable",
8422
+ "anchor-moved"
8423
+ ]);
8424
+ _enum([
8425
+ "live-tail",
8426
+ "listing-error",
8427
+ "path-mismatch",
8428
+ "durable-refused"
8429
+ ]);
8430
+ /** Every skip reason, always present, always a number — so a reason that never
8431
+ * fired reports as zero rather than absent and the report shape is constant
8432
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8433
+ var LedgerWalkSkipCountsSchema = object({
8434
+ "live-tail": number().int().nonnegative(),
8435
+ "listing-error": number().int().nonnegative(),
8436
+ "path-mismatch": number().int().nonnegative(),
8437
+ "durable-refused": number().int().nonnegative()
8438
+ });
8439
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8440
+ var LedgerWalkDeviceReportSchema = object({
8441
+ deviceId: number().int(),
8442
+ hoursWalked: number().int().nonnegative(),
8443
+ hoursMissing: number().int().nonnegative(),
8444
+ ghostSegments: number().int().nonnegative(),
8445
+ ghostBytes: number().int().nonnegative(),
8446
+ forgottenSegments: number().int().nonnegative(),
8447
+ orphanFiles: number().int().nonnegative()
8448
+ });
8449
+ /**
8450
+ * What one walk claimed, listed, found and (only when armed) forgot.
8451
+ *
8452
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8453
+ * walk that saw a fraction of the location is visible in its own report rather
8454
+ * than in the absence of one.
8455
+ */
8456
+ var LedgerWalkReportSchema = object({
8457
+ locationId: string(),
8458
+ applied: boolean(),
8459
+ refused: LedgerWalkRefusalSchema.nullable(),
8460
+ archiveSegments: number().int().nonnegative().nullable(),
8461
+ archiveBytes: number().int().nonnegative().nullable(),
8462
+ hoursClaimed: number().int().nonnegative(),
8463
+ hoursWalked: number().int().nonnegative(),
8464
+ hoursMissing: number().int().nonnegative(),
8465
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8466
+ listings: number().int().nonnegative(),
8467
+ segmentsClaimed: number().int().nonnegative(),
8468
+ ghostSegments: number().int().nonnegative(),
8469
+ ghostBytes: number().int().nonnegative(),
8470
+ ghostHoursWhole: number().int().nonnegative(),
8471
+ forgottenSegments: number().int().nonnegative(),
8472
+ forgottenBytes: number().int().nonnegative(),
8473
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8474
+ orphanFiles: number().int().nonnegative(),
8475
+ orphanSample: array(string()).readonly(),
8476
+ hoursSkipped: number().int().nonnegative(),
8477
+ skippedByReason: LedgerWalkSkipCountsSchema,
8478
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8479
+ bounded: boolean(),
8480
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8481
+ });
8383
8482
  /** How many rows a media pass would still act on against a given target — the
8384
8483
  * media lane's denominator AND its residue, from ONE derivation so the two can
8385
8484
  * never disagree. `null` = the count could not be taken. */
@@ -18995,13 +19094,15 @@ var ListGroupsPageSchema = object({
18995
19094
  groups: array(AnalyticsGroupRecordSchema).readonly(),
18996
19095
  nextCursor: string().nullable()
18997
19096
  });
19097
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19098
+ var KEY_EVENTS_MAX_LIMIT = 200;
18998
19099
  var KeyEventQueryInput = object({
18999
19100
  deviceId: number(),
19000
19101
  /** Window lower bound (track firstSeen ≥ since). */
19001
19102
  since: number(),
19002
19103
  /** Window upper bound (track firstSeen ≤ until). */
19003
19104
  until: number(),
19004
- limit: number().int().min(1).max(200).default(50),
19105
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19005
19106
  /** Drop tracks scoring below this importance. */
19006
19107
  minImportance: number().min(0).max(1).optional(),
19007
19108
  /** Restrict to a single class (e.g. 'person'). */
@@ -19023,6 +19124,32 @@ var KeyEventSchema = object({
19023
19124
  ...TrackFlagFields,
19024
19125
  ...TrackRetrainFields
19025
19126
  });
19127
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19128
+ var KeyEventBatchQueryInput = object({
19129
+ deviceIds: array(number()).min(1).max(200),
19130
+ since: number(),
19131
+ until: number(),
19132
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19133
+ * across the set, which would let a busy camera starve a quiet one of its
19134
+ * rows and change what the merged feed contains. */
19135
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19136
+ minImportance: number().min(0).max(1).optional(),
19137
+ classFilter: string().optional()
19138
+ });
19139
+ /**
19140
+ * One camera's key events in a batch answer.
19141
+ *
19142
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19143
+ * error rather than throwing, so a camera whose store read failed and one with
19144
+ * no events in the window were ALREADY indistinguishable per camera — the
19145
+ * batch does not make that worse, and the row keeps the deviceId the single
19146
+ * method's output never carried (the caller used to stamp it from the fan-out
19147
+ * key, which only worked because there was one query per camera).
19148
+ */
19149
+ var KeyEventsForDeviceSchema = object({
19150
+ deviceId: number(),
19151
+ events: array(KeyEventSchema).readonly()
19152
+ });
19026
19153
  object({
19027
19154
  trackId: string(),
19028
19155
  className: string(),
@@ -19292,7 +19419,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19292
19419
  until: number().optional(),
19293
19420
  kinds: array(string()).optional(),
19294
19421
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19295
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19422
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19296
19423
  deviceId: number(),
19297
19424
  since: number(),
19298
19425
  until: number(),
@@ -28659,6 +28786,9 @@ method(object({
28659
28786
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28660
28787
  kind: "query",
28661
28788
  auth: "admin"
28789
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28790
+ kind: "mutation",
28791
+ auth: "admin"
28662
28792
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28663
28793
  kind: "mutation",
28664
28794
  auth: "admin"
@@ -29050,6 +29180,25 @@ var SceneMonitorStatusSchema = object({
29050
29180
  monitors: array(SceneMonitorSchema),
29051
29181
  lastFetchedAt: number()
29052
29182
  });
29183
+ /**
29184
+ * One camera's row in a `listScenesBatch` answer.
29185
+ *
29186
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29187
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29188
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29189
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29190
+ * configured. Fanned out per camera the difference was visible — one query
29191
+ * errored while the others resolved — and a batch that returned only the rows
29192
+ * it managed would have destroyed it, silently, by making an unreachable camera
29193
+ * indistinguishable from one that answered `monitors: []`.
29194
+ *
29195
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29196
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29197
+ */
29198
+ var SceneMonitorStatusForDeviceSchema = object({
29199
+ deviceId: number(),
29200
+ status: SceneMonitorStatusSchema.nullable()
29201
+ });
29053
29202
  var sceneMonitorCapability = {
29054
29203
  name: "scene-monitor",
29055
29204
  scope: "device",
@@ -29059,6 +29208,22 @@ var sceneMonitorCapability = {
29059
29208
  deviceTypes: [DeviceType.Camera],
29060
29209
  methods: {
29061
29210
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29211
+ /**
29212
+ * The same answer, for a SET of cameras, in one round trip.
29213
+ *
29214
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29215
+ * poll behind the push slice. Fanned out client-side that was one query
29216
+ * per camera — 29 round trips through the browser, the hub and the
29217
+ * post-analysis runner every 30 seconds to read an in-memory map the
29218
+ * owner had already merged. The work is unchanged (`statusFor` per
29219
+ * device, all in-process at the owner); what collapses is the transport.
29220
+ *
29221
+ * A camera that cannot answer still gets a row, with `status: null` —
29222
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29223
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29224
+ * tell which two are missing, or that any are.
29225
+ */
29226
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29062
29227
  createScene: method(object({
29063
29228
  deviceId: number(),
29064
29229
  label: string(),
@@ -30894,6 +31059,27 @@ var CameraOccupancySnapshotSchema = object({
30894
31059
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30895
31060
  });
30896
31061
  /**
31062
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31063
+ *
31064
+ * THREE outcomes, and the single-camera method could only express two of them
31065
+ * because `snapshot: null` was already spoken for:
31066
+ *
31067
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31068
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31069
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31070
+ * - `read: 'unreadable'` — the owner could not answer for this
31071
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31072
+ *
31073
+ * Collapsing the last two is the failure this field exists to prevent: a
31074
+ * hydration that threw would otherwise render as an empty Stationary section,
31075
+ * which is a definite claim about a camera nobody could read.
31076
+ */
31077
+ var CameraOccupancySnapshotForDeviceSchema = object({
31078
+ deviceId: number(),
31079
+ read: _enum(["read", "unreadable"]),
31080
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31081
+ });
31082
+ /**
30897
31083
  * Time-series resolution. The history methods return one bucket per
30898
31084
  * step over the requested range. Smaller resolutions cost more
30899
31085
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -30950,6 +31136,20 @@ var zoneAnalyticsCapability = {
30950
31136
  * (no inference result emitted since boot or since binding was
30951
31137
  * activated). */
30952
31138
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31139
+ /**
31140
+ * The same snapshot, for a SET of cameras, in one round trip.
31141
+ *
31142
+ * The Events page's Stationary section polls this every 15s for every
31143
+ * selected camera. Fanned out client-side that is one query per camera to
31144
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31145
+ * costs everything. Batched, N transports become one and the per-device
31146
+ * work is unchanged.
31147
+ *
31148
+ * Every requested deviceId gets a row, tagged `read` — see
31149
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31150
+ * not answer for is `'unreadable'`, never an empty reading.
31151
+ */
31152
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
30953
31153
  /** Time-series object count inside one zone. `className` optional —
30954
31154
  * omit to count every class in the zone. */
30955
31155
  getZoneHistory: method(object({
@@ -35371,6 +35571,12 @@ Object.freeze({
35371
35571
  addonId: null,
35372
35572
  access: "view"
35373
35573
  },
35574
+ "pipelineAnalytics.getKeyEventsBatch": {
35575
+ capName: "pipeline-analytics",
35576
+ capScope: "device",
35577
+ addonId: null,
35578
+ access: "view"
35579
+ },
35374
35580
  "pipelineAnalytics.getMotionEvents": {
35375
35581
  capName: "pipeline-analytics",
35376
35582
  capScope: "device",
@@ -36547,6 +36753,12 @@ Object.freeze({
36547
36753
  addonId: null,
36548
36754
  access: "view"
36549
36755
  },
36756
+ "recording.reconcileLedgerAgainstDisk": {
36757
+ capName: "recording",
36758
+ capScope: "system",
36759
+ addonId: null,
36760
+ access: "create"
36761
+ },
36550
36762
  "recording.refreshStorageLocationsForMigration": {
36551
36763
  capName: "recording",
36552
36764
  capScope: "system",
@@ -36673,6 +36885,12 @@ Object.freeze({
36673
36885
  addonId: null,
36674
36886
  access: "view"
36675
36887
  },
36888
+ "sceneMonitor.listScenesBatch": {
36889
+ capName: "scene-monitor",
36890
+ capScope: "device",
36891
+ addonId: null,
36892
+ access: "view"
36893
+ },
36676
36894
  "sceneMonitor.recheckNow": {
36677
36895
  capName: "scene-monitor",
36678
36896
  capScope: "device",
@@ -38029,6 +38247,12 @@ Object.freeze({
38029
38247
  addonId: null,
38030
38248
  access: "view"
38031
38249
  },
38250
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38251
+ capName: "zone-analytics",
38252
+ capScope: "device",
38253
+ addonId: null,
38254
+ access: "view"
38255
+ },
38032
38256
  "zoneAnalytics.getUnzonedHistory": {
38033
38257
  capName: "zone-analytics",
38034
38258
  capScope: "device",
@@ -39033,6 +39257,11 @@ Object.freeze({
39033
39257
  form: "single",
39034
39258
  optional: false
39035
39259
  }],
39260
+ "pipelineAnalytics.getKeyEventsBatch": [{
39261
+ name: "deviceIds",
39262
+ form: "array",
39263
+ optional: false
39264
+ }],
39036
39265
  "pipelineAnalytics.getMotionEvents": [{
39037
39266
  name: "deviceId",
39038
39267
  form: "single",
@@ -39473,6 +39702,11 @@ Object.freeze({
39473
39702
  form: "single",
39474
39703
  optional: false
39475
39704
  }],
39705
+ "recording.reconcileLedgerAgainstDisk": [{
39706
+ name: "deviceId",
39707
+ form: "single",
39708
+ optional: true
39709
+ }],
39476
39710
  "recording.relocateFootage": [{
39477
39711
  name: "deviceId",
39478
39712
  form: "single",
@@ -39538,6 +39772,11 @@ Object.freeze({
39538
39772
  form: "single",
39539
39773
  optional: false
39540
39774
  }],
39775
+ "sceneMonitor.listScenesBatch": [{
39776
+ name: "deviceIds",
39777
+ form: "array",
39778
+ optional: false
39779
+ }],
39541
39780
  "sceneMonitor.recheckNow": [{
39542
39781
  name: "deviceId",
39543
39782
  form: "single",
@@ -39799,6 +40038,11 @@ Object.freeze({
39799
40038
  form: "single",
39800
40039
  optional: false
39801
40040
  }],
40041
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40042
+ name: "deviceIds",
40043
+ form: "array",
40044
+ optional: false
40045
+ }],
39802
40046
  "zoneAnalytics.getUnzonedHistory": [{
39803
40047
  name: "deviceId",
39804
40048
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",