@camstack/addon-provider-homematic 1.2.49 → 1.2.50

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
@@ -8027,6 +8027,20 @@ var RelocateJobSchema = object({
8027
8027
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8028
8028
  */
8029
8029
  rowsReconciled: number().int().nonnegative().optional(),
8030
+ /**
8031
+ * Rows this run FORGOT because the file they name is not on disk.
8032
+ *
8033
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8034
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8035
+ * and the durable row is dropped through the same channel eviction uses. It
8036
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8037
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8038
+ * the same failure as one that quietly skips them (D295).
8039
+ *
8040
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8041
+ * ledger claimed 5.65 GB of footage that no longer existed.
8042
+ */
8043
+ rowsForgotten: number().int().nonnegative().optional(),
8030
8044
  startedAt: number(),
8031
8045
  finishedAt: number().nullable(),
8032
8046
  error: string().nullable()
@@ -8390,6 +8404,91 @@ var RelocateResidueSchema = object({
8390
8404
  segments: number().int().nonnegative(),
8391
8405
  bytes: number().int().nonnegative()
8392
8406
  }).nullable();
8407
+ /**
8408
+ * Ask one location whether its durable hour rows describe the disk — the walk
8409
+ * (D319).
8410
+ *
8411
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8412
+ * missing tool is the question, and the dry run is how they sanity-check the
8413
+ * destructive run before authorising it.
8414
+ */
8415
+ var LedgerWalkInputSchema = object({
8416
+ locationId: string().min(1),
8417
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8418
+ apply: boolean().optional(),
8419
+ /** Narrow to one camera. */
8420
+ deviceId: number().int().positive().optional(),
8421
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8422
+ profiles: array(string().min(1)).optional()
8423
+ });
8424
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8425
+ var LedgerWalkRefusalSchema = _enum([
8426
+ "location-unknown",
8427
+ "source-writable",
8428
+ "no-ledger",
8429
+ "archive-unreadable",
8430
+ "anchor-absent",
8431
+ "anchor-unreadable",
8432
+ "anchor-moved"
8433
+ ]);
8434
+ _enum([
8435
+ "live-tail",
8436
+ "listing-error",
8437
+ "path-mismatch",
8438
+ "durable-refused"
8439
+ ]);
8440
+ /** Every skip reason, always present, always a number — so a reason that never
8441
+ * fired reports as zero rather than absent and the report shape is constant
8442
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8443
+ var LedgerWalkSkipCountsSchema = object({
8444
+ "live-tail": number().int().nonnegative(),
8445
+ "listing-error": number().int().nonnegative(),
8446
+ "path-mismatch": number().int().nonnegative(),
8447
+ "durable-refused": number().int().nonnegative()
8448
+ });
8449
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8450
+ var LedgerWalkDeviceReportSchema = object({
8451
+ deviceId: number().int(),
8452
+ hoursWalked: number().int().nonnegative(),
8453
+ hoursMissing: number().int().nonnegative(),
8454
+ ghostSegments: number().int().nonnegative(),
8455
+ ghostBytes: number().int().nonnegative(),
8456
+ forgottenSegments: number().int().nonnegative(),
8457
+ orphanFiles: number().int().nonnegative()
8458
+ });
8459
+ /**
8460
+ * What one walk claimed, listed, found and (only when armed) forgot.
8461
+ *
8462
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8463
+ * walk that saw a fraction of the location is visible in its own report rather
8464
+ * than in the absence of one.
8465
+ */
8466
+ var LedgerWalkReportSchema = object({
8467
+ locationId: string(),
8468
+ applied: boolean(),
8469
+ refused: LedgerWalkRefusalSchema.nullable(),
8470
+ archiveSegments: number().int().nonnegative().nullable(),
8471
+ archiveBytes: number().int().nonnegative().nullable(),
8472
+ hoursClaimed: number().int().nonnegative(),
8473
+ hoursWalked: number().int().nonnegative(),
8474
+ hoursMissing: number().int().nonnegative(),
8475
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8476
+ listings: number().int().nonnegative(),
8477
+ segmentsClaimed: number().int().nonnegative(),
8478
+ ghostSegments: number().int().nonnegative(),
8479
+ ghostBytes: number().int().nonnegative(),
8480
+ ghostHoursWhole: number().int().nonnegative(),
8481
+ forgottenSegments: number().int().nonnegative(),
8482
+ forgottenBytes: number().int().nonnegative(),
8483
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8484
+ orphanFiles: number().int().nonnegative(),
8485
+ orphanSample: array(string()).readonly(),
8486
+ hoursSkipped: number().int().nonnegative(),
8487
+ skippedByReason: LedgerWalkSkipCountsSchema,
8488
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8489
+ bounded: boolean(),
8490
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8491
+ });
8393
8492
  /** How many rows a media pass would still act on against a given target — the
8394
8493
  * media lane's denominator AND its residue, from ONE derivation so the two can
8395
8494
  * never disagree. `null` = the count could not be taken. */
@@ -19071,13 +19170,15 @@ var ListGroupsPageSchema = object({
19071
19170
  groups: array(AnalyticsGroupRecordSchema).readonly(),
19072
19171
  nextCursor: string().nullable()
19073
19172
  });
19173
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19174
+ var KEY_EVENTS_MAX_LIMIT = 200;
19074
19175
  var KeyEventQueryInput = object({
19075
19176
  deviceId: number(),
19076
19177
  /** Window lower bound (track firstSeen ≥ since). */
19077
19178
  since: number(),
19078
19179
  /** Window upper bound (track firstSeen ≤ until). */
19079
19180
  until: number(),
19080
- limit: number().int().min(1).max(200).default(50),
19181
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19081
19182
  /** Drop tracks scoring below this importance. */
19082
19183
  minImportance: number().min(0).max(1).optional(),
19083
19184
  /** Restrict to a single class (e.g. 'person'). */
@@ -19099,6 +19200,32 @@ var KeyEventSchema = object({
19099
19200
  ...TrackFlagFields,
19100
19201
  ...TrackRetrainFields
19101
19202
  });
19203
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19204
+ var KeyEventBatchQueryInput = object({
19205
+ deviceIds: array(number()).min(1).max(200),
19206
+ since: number(),
19207
+ until: number(),
19208
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19209
+ * across the set, which would let a busy camera starve a quiet one of its
19210
+ * rows and change what the merged feed contains. */
19211
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19212
+ minImportance: number().min(0).max(1).optional(),
19213
+ classFilter: string().optional()
19214
+ });
19215
+ /**
19216
+ * One camera's key events in a batch answer.
19217
+ *
19218
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19219
+ * error rather than throwing, so a camera whose store read failed and one with
19220
+ * no events in the window were ALREADY indistinguishable per camera — the
19221
+ * batch does not make that worse, and the row keeps the deviceId the single
19222
+ * method's output never carried (the caller used to stamp it from the fan-out
19223
+ * key, which only worked because there was one query per camera).
19224
+ */
19225
+ var KeyEventsForDeviceSchema = object({
19226
+ deviceId: number(),
19227
+ events: array(KeyEventSchema).readonly()
19228
+ });
19102
19229
  object({
19103
19230
  trackId: string(),
19104
19231
  className: string(),
@@ -19368,7 +19495,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19368
19495
  until: number().optional(),
19369
19496
  kinds: array(string()).optional(),
19370
19497
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19371
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19498
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19372
19499
  deviceId: number(),
19373
19500
  since: number(),
19374
19501
  until: number(),
@@ -28735,6 +28862,9 @@ method(object({
28735
28862
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28736
28863
  kind: "query",
28737
28864
  auth: "admin"
28865
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28866
+ kind: "mutation",
28867
+ auth: "admin"
28738
28868
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28739
28869
  kind: "mutation",
28740
28870
  auth: "admin"
@@ -29126,6 +29256,25 @@ var SceneMonitorStatusSchema = object({
29126
29256
  monitors: array(SceneMonitorSchema),
29127
29257
  lastFetchedAt: number()
29128
29258
  });
29259
+ /**
29260
+ * One camera's row in a `listScenesBatch` answer.
29261
+ *
29262
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29263
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29264
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29265
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29266
+ * configured. Fanned out per camera the difference was visible — one query
29267
+ * errored while the others resolved — and a batch that returned only the rows
29268
+ * it managed would have destroyed it, silently, by making an unreachable camera
29269
+ * indistinguishable from one that answered `monitors: []`.
29270
+ *
29271
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29272
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29273
+ */
29274
+ var SceneMonitorStatusForDeviceSchema = object({
29275
+ deviceId: number(),
29276
+ status: SceneMonitorStatusSchema.nullable()
29277
+ });
29129
29278
  var sceneMonitorCapability = {
29130
29279
  name: "scene-monitor",
29131
29280
  scope: "device",
@@ -29135,6 +29284,22 @@ var sceneMonitorCapability = {
29135
29284
  deviceTypes: [DeviceType.Camera],
29136
29285
  methods: {
29137
29286
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29287
+ /**
29288
+ * The same answer, for a SET of cameras, in one round trip.
29289
+ *
29290
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29291
+ * poll behind the push slice. Fanned out client-side that was one query
29292
+ * per camera — 29 round trips through the browser, the hub and the
29293
+ * post-analysis runner every 30 seconds to read an in-memory map the
29294
+ * owner had already merged. The work is unchanged (`statusFor` per
29295
+ * device, all in-process at the owner); what collapses is the transport.
29296
+ *
29297
+ * A camera that cannot answer still gets a row, with `status: null` —
29298
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29299
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29300
+ * tell which two are missing, or that any are.
29301
+ */
29302
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29138
29303
  createScene: method(object({
29139
29304
  deviceId: number(),
29140
29305
  label: string(),
@@ -30970,6 +31135,27 @@ var CameraOccupancySnapshotSchema = object({
30970
31135
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30971
31136
  });
30972
31137
  /**
31138
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31139
+ *
31140
+ * THREE outcomes, and the single-camera method could only express two of them
31141
+ * because `snapshot: null` was already spoken for:
31142
+ *
31143
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31144
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31145
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31146
+ * - `read: 'unreadable'` — the owner could not answer for this
31147
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31148
+ *
31149
+ * Collapsing the last two is the failure this field exists to prevent: a
31150
+ * hydration that threw would otherwise render as an empty Stationary section,
31151
+ * which is a definite claim about a camera nobody could read.
31152
+ */
31153
+ var CameraOccupancySnapshotForDeviceSchema = object({
31154
+ deviceId: number(),
31155
+ read: _enum(["read", "unreadable"]),
31156
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31157
+ });
31158
+ /**
30973
31159
  * Time-series resolution. The history methods return one bucket per
30974
31160
  * step over the requested range. Smaller resolutions cost more
30975
31161
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -31026,6 +31212,20 @@ var zoneAnalyticsCapability = {
31026
31212
  * (no inference result emitted since boot or since binding was
31027
31213
  * activated). */
31028
31214
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31215
+ /**
31216
+ * The same snapshot, for a SET of cameras, in one round trip.
31217
+ *
31218
+ * The Events page's Stationary section polls this every 15s for every
31219
+ * selected camera. Fanned out client-side that is one query per camera to
31220
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31221
+ * costs everything. Batched, N transports become one and the per-device
31222
+ * work is unchanged.
31223
+ *
31224
+ * Every requested deviceId gets a row, tagged `read` — see
31225
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31226
+ * not answer for is `'unreadable'`, never an empty reading.
31227
+ */
31228
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
31029
31229
  /** Time-series object count inside one zone. `className` optional —
31030
31230
  * omit to count every class in the zone. */
31031
31231
  getZoneHistory: method(object({
@@ -35447,6 +35647,12 @@ Object.freeze({
35447
35647
  addonId: null,
35448
35648
  access: "view"
35449
35649
  },
35650
+ "pipelineAnalytics.getKeyEventsBatch": {
35651
+ capName: "pipeline-analytics",
35652
+ capScope: "device",
35653
+ addonId: null,
35654
+ access: "view"
35655
+ },
35450
35656
  "pipelineAnalytics.getMotionEvents": {
35451
35657
  capName: "pipeline-analytics",
35452
35658
  capScope: "device",
@@ -36623,6 +36829,12 @@ Object.freeze({
36623
36829
  addonId: null,
36624
36830
  access: "view"
36625
36831
  },
36832
+ "recording.reconcileLedgerAgainstDisk": {
36833
+ capName: "recording",
36834
+ capScope: "system",
36835
+ addonId: null,
36836
+ access: "create"
36837
+ },
36626
36838
  "recording.refreshStorageLocationsForMigration": {
36627
36839
  capName: "recording",
36628
36840
  capScope: "system",
@@ -36749,6 +36961,12 @@ Object.freeze({
36749
36961
  addonId: null,
36750
36962
  access: "view"
36751
36963
  },
36964
+ "sceneMonitor.listScenesBatch": {
36965
+ capName: "scene-monitor",
36966
+ capScope: "device",
36967
+ addonId: null,
36968
+ access: "view"
36969
+ },
36752
36970
  "sceneMonitor.recheckNow": {
36753
36971
  capName: "scene-monitor",
36754
36972
  capScope: "device",
@@ -38105,6 +38323,12 @@ Object.freeze({
38105
38323
  addonId: null,
38106
38324
  access: "view"
38107
38325
  },
38326
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38327
+ capName: "zone-analytics",
38328
+ capScope: "device",
38329
+ addonId: null,
38330
+ access: "view"
38331
+ },
38108
38332
  "zoneAnalytics.getUnzonedHistory": {
38109
38333
  capName: "zone-analytics",
38110
38334
  capScope: "device",
@@ -39109,6 +39333,11 @@ Object.freeze({
39109
39333
  form: "single",
39110
39334
  optional: false
39111
39335
  }],
39336
+ "pipelineAnalytics.getKeyEventsBatch": [{
39337
+ name: "deviceIds",
39338
+ form: "array",
39339
+ optional: false
39340
+ }],
39112
39341
  "pipelineAnalytics.getMotionEvents": [{
39113
39342
  name: "deviceId",
39114
39343
  form: "single",
@@ -39549,6 +39778,11 @@ Object.freeze({
39549
39778
  form: "single",
39550
39779
  optional: false
39551
39780
  }],
39781
+ "recording.reconcileLedgerAgainstDisk": [{
39782
+ name: "deviceId",
39783
+ form: "single",
39784
+ optional: true
39785
+ }],
39552
39786
  "recording.relocateFootage": [{
39553
39787
  name: "deviceId",
39554
39788
  form: "single",
@@ -39614,6 +39848,11 @@ Object.freeze({
39614
39848
  form: "single",
39615
39849
  optional: false
39616
39850
  }],
39851
+ "sceneMonitor.listScenesBatch": [{
39852
+ name: "deviceIds",
39853
+ form: "array",
39854
+ optional: false
39855
+ }],
39617
39856
  "sceneMonitor.recheckNow": [{
39618
39857
  name: "deviceId",
39619
39858
  form: "single",
@@ -39875,6 +40114,11 @@ Object.freeze({
39875
40114
  form: "single",
39876
40115
  optional: false
39877
40116
  }],
40117
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40118
+ name: "deviceIds",
40119
+ form: "array",
40120
+ optional: false
40121
+ }],
39878
40122
  "zoneAnalytics.getUnzonedHistory": [{
39879
40123
  name: "deviceId",
39880
40124
  form: "single",
package/dist/addon.mjs CHANGED
@@ -8028,6 +8028,20 @@ var RelocateJobSchema = object({
8028
8028
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8029
8029
  */
8030
8030
  rowsReconciled: number().int().nonnegative().optional(),
8031
+ /**
8032
+ * Rows this run FORGOT because the file they name is not on disk.
8033
+ *
8034
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8035
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8036
+ * and the durable row is dropped through the same channel eviction uses. It
8037
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8038
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8039
+ * the same failure as one that quietly skips them (D295).
8040
+ *
8041
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8042
+ * ledger claimed 5.65 GB of footage that no longer existed.
8043
+ */
8044
+ rowsForgotten: number().int().nonnegative().optional(),
8031
8045
  startedAt: number(),
8032
8046
  finishedAt: number().nullable(),
8033
8047
  error: string().nullable()
@@ -8391,6 +8405,91 @@ var RelocateResidueSchema = object({
8391
8405
  segments: number().int().nonnegative(),
8392
8406
  bytes: number().int().nonnegative()
8393
8407
  }).nullable();
8408
+ /**
8409
+ * Ask one location whether its durable hour rows describe the disk — the walk
8410
+ * (D319).
8411
+ *
8412
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8413
+ * missing tool is the question, and the dry run is how they sanity-check the
8414
+ * destructive run before authorising it.
8415
+ */
8416
+ var LedgerWalkInputSchema = object({
8417
+ locationId: string().min(1),
8418
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8419
+ apply: boolean().optional(),
8420
+ /** Narrow to one camera. */
8421
+ deviceId: number().int().positive().optional(),
8422
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8423
+ profiles: array(string().min(1)).optional()
8424
+ });
8425
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8426
+ var LedgerWalkRefusalSchema = _enum([
8427
+ "location-unknown",
8428
+ "source-writable",
8429
+ "no-ledger",
8430
+ "archive-unreadable",
8431
+ "anchor-absent",
8432
+ "anchor-unreadable",
8433
+ "anchor-moved"
8434
+ ]);
8435
+ _enum([
8436
+ "live-tail",
8437
+ "listing-error",
8438
+ "path-mismatch",
8439
+ "durable-refused"
8440
+ ]);
8441
+ /** Every skip reason, always present, always a number — so a reason that never
8442
+ * fired reports as zero rather than absent and the report shape is constant
8443
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8444
+ var LedgerWalkSkipCountsSchema = object({
8445
+ "live-tail": number().int().nonnegative(),
8446
+ "listing-error": number().int().nonnegative(),
8447
+ "path-mismatch": number().int().nonnegative(),
8448
+ "durable-refused": number().int().nonnegative()
8449
+ });
8450
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8451
+ var LedgerWalkDeviceReportSchema = object({
8452
+ deviceId: number().int(),
8453
+ hoursWalked: number().int().nonnegative(),
8454
+ hoursMissing: number().int().nonnegative(),
8455
+ ghostSegments: number().int().nonnegative(),
8456
+ ghostBytes: number().int().nonnegative(),
8457
+ forgottenSegments: number().int().nonnegative(),
8458
+ orphanFiles: number().int().nonnegative()
8459
+ });
8460
+ /**
8461
+ * What one walk claimed, listed, found and (only when armed) forgot.
8462
+ *
8463
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8464
+ * walk that saw a fraction of the location is visible in its own report rather
8465
+ * than in the absence of one.
8466
+ */
8467
+ var LedgerWalkReportSchema = object({
8468
+ locationId: string(),
8469
+ applied: boolean(),
8470
+ refused: LedgerWalkRefusalSchema.nullable(),
8471
+ archiveSegments: number().int().nonnegative().nullable(),
8472
+ archiveBytes: number().int().nonnegative().nullable(),
8473
+ hoursClaimed: number().int().nonnegative(),
8474
+ hoursWalked: number().int().nonnegative(),
8475
+ hoursMissing: number().int().nonnegative(),
8476
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8477
+ listings: number().int().nonnegative(),
8478
+ segmentsClaimed: number().int().nonnegative(),
8479
+ ghostSegments: number().int().nonnegative(),
8480
+ ghostBytes: number().int().nonnegative(),
8481
+ ghostHoursWhole: number().int().nonnegative(),
8482
+ forgottenSegments: number().int().nonnegative(),
8483
+ forgottenBytes: number().int().nonnegative(),
8484
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8485
+ orphanFiles: number().int().nonnegative(),
8486
+ orphanSample: array(string()).readonly(),
8487
+ hoursSkipped: number().int().nonnegative(),
8488
+ skippedByReason: LedgerWalkSkipCountsSchema,
8489
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8490
+ bounded: boolean(),
8491
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8492
+ });
8394
8493
  /** How many rows a media pass would still act on against a given target — the
8395
8494
  * media lane's denominator AND its residue, from ONE derivation so the two can
8396
8495
  * never disagree. `null` = the count could not be taken. */
@@ -19072,13 +19171,15 @@ var ListGroupsPageSchema = object({
19072
19171
  groups: array(AnalyticsGroupRecordSchema).readonly(),
19073
19172
  nextCursor: string().nullable()
19074
19173
  });
19174
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19175
+ var KEY_EVENTS_MAX_LIMIT = 200;
19075
19176
  var KeyEventQueryInput = object({
19076
19177
  deviceId: number(),
19077
19178
  /** Window lower bound (track firstSeen ≥ since). */
19078
19179
  since: number(),
19079
19180
  /** Window upper bound (track firstSeen ≤ until). */
19080
19181
  until: number(),
19081
- limit: number().int().min(1).max(200).default(50),
19182
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19082
19183
  /** Drop tracks scoring below this importance. */
19083
19184
  minImportance: number().min(0).max(1).optional(),
19084
19185
  /** Restrict to a single class (e.g. 'person'). */
@@ -19100,6 +19201,32 @@ var KeyEventSchema = object({
19100
19201
  ...TrackFlagFields,
19101
19202
  ...TrackRetrainFields
19102
19203
  });
19204
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19205
+ var KeyEventBatchQueryInput = object({
19206
+ deviceIds: array(number()).min(1).max(200),
19207
+ since: number(),
19208
+ until: number(),
19209
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19210
+ * across the set, which would let a busy camera starve a quiet one of its
19211
+ * rows and change what the merged feed contains. */
19212
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19213
+ minImportance: number().min(0).max(1).optional(),
19214
+ classFilter: string().optional()
19215
+ });
19216
+ /**
19217
+ * One camera's key events in a batch answer.
19218
+ *
19219
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19220
+ * error rather than throwing, so a camera whose store read failed and one with
19221
+ * no events in the window were ALREADY indistinguishable per camera — the
19222
+ * batch does not make that worse, and the row keeps the deviceId the single
19223
+ * method's output never carried (the caller used to stamp it from the fan-out
19224
+ * key, which only worked because there was one query per camera).
19225
+ */
19226
+ var KeyEventsForDeviceSchema = object({
19227
+ deviceId: number(),
19228
+ events: array(KeyEventSchema).readonly()
19229
+ });
19103
19230
  object({
19104
19231
  trackId: string(),
19105
19232
  className: string(),
@@ -19369,7 +19496,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19369
19496
  until: number().optional(),
19370
19497
  kinds: array(string()).optional(),
19371
19498
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19372
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19499
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19373
19500
  deviceId: number(),
19374
19501
  since: number(),
19375
19502
  until: number(),
@@ -28736,6 +28863,9 @@ method(object({
28736
28863
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28737
28864
  kind: "query",
28738
28865
  auth: "admin"
28866
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28867
+ kind: "mutation",
28868
+ auth: "admin"
28739
28869
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28740
28870
  kind: "mutation",
28741
28871
  auth: "admin"
@@ -29127,6 +29257,25 @@ var SceneMonitorStatusSchema = object({
29127
29257
  monitors: array(SceneMonitorSchema),
29128
29258
  lastFetchedAt: number()
29129
29259
  });
29260
+ /**
29261
+ * One camera's row in a `listScenesBatch` answer.
29262
+ *
29263
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29264
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29265
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29266
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29267
+ * configured. Fanned out per camera the difference was visible — one query
29268
+ * errored while the others resolved — and a batch that returned only the rows
29269
+ * it managed would have destroyed it, silently, by making an unreachable camera
29270
+ * indistinguishable from one that answered `monitors: []`.
29271
+ *
29272
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29273
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29274
+ */
29275
+ var SceneMonitorStatusForDeviceSchema = object({
29276
+ deviceId: number(),
29277
+ status: SceneMonitorStatusSchema.nullable()
29278
+ });
29130
29279
  var sceneMonitorCapability = {
29131
29280
  name: "scene-monitor",
29132
29281
  scope: "device",
@@ -29136,6 +29285,22 @@ var sceneMonitorCapability = {
29136
29285
  deviceTypes: [DeviceType.Camera],
29137
29286
  methods: {
29138
29287
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29288
+ /**
29289
+ * The same answer, for a SET of cameras, in one round trip.
29290
+ *
29291
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29292
+ * poll behind the push slice. Fanned out client-side that was one query
29293
+ * per camera — 29 round trips through the browser, the hub and the
29294
+ * post-analysis runner every 30 seconds to read an in-memory map the
29295
+ * owner had already merged. The work is unchanged (`statusFor` per
29296
+ * device, all in-process at the owner); what collapses is the transport.
29297
+ *
29298
+ * A camera that cannot answer still gets a row, with `status: null` —
29299
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29300
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29301
+ * tell which two are missing, or that any are.
29302
+ */
29303
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29139
29304
  createScene: method(object({
29140
29305
  deviceId: number(),
29141
29306
  label: string(),
@@ -30971,6 +31136,27 @@ var CameraOccupancySnapshotSchema = object({
30971
31136
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30972
31137
  });
30973
31138
  /**
31139
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31140
+ *
31141
+ * THREE outcomes, and the single-camera method could only express two of them
31142
+ * because `snapshot: null` was already spoken for:
31143
+ *
31144
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31145
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31146
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31147
+ * - `read: 'unreadable'` — the owner could not answer for this
31148
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31149
+ *
31150
+ * Collapsing the last two is the failure this field exists to prevent: a
31151
+ * hydration that threw would otherwise render as an empty Stationary section,
31152
+ * which is a definite claim about a camera nobody could read.
31153
+ */
31154
+ var CameraOccupancySnapshotForDeviceSchema = object({
31155
+ deviceId: number(),
31156
+ read: _enum(["read", "unreadable"]),
31157
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31158
+ });
31159
+ /**
30974
31160
  * Time-series resolution. The history methods return one bucket per
30975
31161
  * step over the requested range. Smaller resolutions cost more
30976
31162
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -31027,6 +31213,20 @@ var zoneAnalyticsCapability = {
31027
31213
  * (no inference result emitted since boot or since binding was
31028
31214
  * activated). */
31029
31215
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31216
+ /**
31217
+ * The same snapshot, for a SET of cameras, in one round trip.
31218
+ *
31219
+ * The Events page's Stationary section polls this every 15s for every
31220
+ * selected camera. Fanned out client-side that is one query per camera to
31221
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31222
+ * costs everything. Batched, N transports become one and the per-device
31223
+ * work is unchanged.
31224
+ *
31225
+ * Every requested deviceId gets a row, tagged `read` — see
31226
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31227
+ * not answer for is `'unreadable'`, never an empty reading.
31228
+ */
31229
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
31030
31230
  /** Time-series object count inside one zone. `className` optional —
31031
31231
  * omit to count every class in the zone. */
31032
31232
  getZoneHistory: method(object({
@@ -35448,6 +35648,12 @@ Object.freeze({
35448
35648
  addonId: null,
35449
35649
  access: "view"
35450
35650
  },
35651
+ "pipelineAnalytics.getKeyEventsBatch": {
35652
+ capName: "pipeline-analytics",
35653
+ capScope: "device",
35654
+ addonId: null,
35655
+ access: "view"
35656
+ },
35451
35657
  "pipelineAnalytics.getMotionEvents": {
35452
35658
  capName: "pipeline-analytics",
35453
35659
  capScope: "device",
@@ -36624,6 +36830,12 @@ Object.freeze({
36624
36830
  addonId: null,
36625
36831
  access: "view"
36626
36832
  },
36833
+ "recording.reconcileLedgerAgainstDisk": {
36834
+ capName: "recording",
36835
+ capScope: "system",
36836
+ addonId: null,
36837
+ access: "create"
36838
+ },
36627
36839
  "recording.refreshStorageLocationsForMigration": {
36628
36840
  capName: "recording",
36629
36841
  capScope: "system",
@@ -36750,6 +36962,12 @@ Object.freeze({
36750
36962
  addonId: null,
36751
36963
  access: "view"
36752
36964
  },
36965
+ "sceneMonitor.listScenesBatch": {
36966
+ capName: "scene-monitor",
36967
+ capScope: "device",
36968
+ addonId: null,
36969
+ access: "view"
36970
+ },
36753
36971
  "sceneMonitor.recheckNow": {
36754
36972
  capName: "scene-monitor",
36755
36973
  capScope: "device",
@@ -38106,6 +38324,12 @@ Object.freeze({
38106
38324
  addonId: null,
38107
38325
  access: "view"
38108
38326
  },
38327
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38328
+ capName: "zone-analytics",
38329
+ capScope: "device",
38330
+ addonId: null,
38331
+ access: "view"
38332
+ },
38109
38333
  "zoneAnalytics.getUnzonedHistory": {
38110
38334
  capName: "zone-analytics",
38111
38335
  capScope: "device",
@@ -39110,6 +39334,11 @@ Object.freeze({
39110
39334
  form: "single",
39111
39335
  optional: false
39112
39336
  }],
39337
+ "pipelineAnalytics.getKeyEventsBatch": [{
39338
+ name: "deviceIds",
39339
+ form: "array",
39340
+ optional: false
39341
+ }],
39113
39342
  "pipelineAnalytics.getMotionEvents": [{
39114
39343
  name: "deviceId",
39115
39344
  form: "single",
@@ -39550,6 +39779,11 @@ Object.freeze({
39550
39779
  form: "single",
39551
39780
  optional: false
39552
39781
  }],
39782
+ "recording.reconcileLedgerAgainstDisk": [{
39783
+ name: "deviceId",
39784
+ form: "single",
39785
+ optional: true
39786
+ }],
39553
39787
  "recording.relocateFootage": [{
39554
39788
  name: "deviceId",
39555
39789
  form: "single",
@@ -39615,6 +39849,11 @@ Object.freeze({
39615
39849
  form: "single",
39616
39850
  optional: false
39617
39851
  }],
39852
+ "sceneMonitor.listScenesBatch": [{
39853
+ name: "deviceIds",
39854
+ form: "array",
39855
+ optional: false
39856
+ }],
39618
39857
  "sceneMonitor.recheckNow": [{
39619
39858
  name: "deviceId",
39620
39859
  form: "single",
@@ -39876,6 +40115,11 @@ Object.freeze({
39876
40115
  form: "single",
39877
40116
  optional: false
39878
40117
  }],
40118
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40119
+ name: "deviceIds",
40120
+ form: "array",
40121
+ optional: false
40122
+ }],
39879
40123
  "zoneAnalytics.getUnzonedHistory": [{
39880
40124
  name: "deviceId",
39881
40125
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.49",
3
+ "version": "1.2.50",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",