@camstack/addon-provider-dreame 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
@@ -58523,6 +58523,20 @@ var RelocateJobSchema = object({
58523
58523
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
58524
58524
  */
58525
58525
  rowsReconciled: number().int().nonnegative().optional(),
58526
+ /**
58527
+ * Rows this run FORGOT because the file they name is not on disk.
58528
+ *
58529
+ * The mover derived the path from the row's own fields and `stat`ed it; an
58530
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
58531
+ * and the durable row is dropped through the same channel eviction uses. It
58532
+ * is reported for the same reason `rowsReconciled` is: this is a durable
58533
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
58534
+ * the same failure as one that quietly skips them (D295).
58535
+ *
58536
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
58537
+ * ledger claimed 5.65 GB of footage that no longer existed.
58538
+ */
58539
+ rowsForgotten: number().int().nonnegative().optional(),
58526
58540
  startedAt: number(),
58527
58541
  finishedAt: number().nullable(),
58528
58542
  error: string().nullable()
@@ -58886,6 +58900,91 @@ var RelocateResidueSchema = object({
58886
58900
  segments: number().int().nonnegative(),
58887
58901
  bytes: number().int().nonnegative()
58888
58902
  }).nullable();
58903
+ /**
58904
+ * Ask one location whether its durable hour rows describe the disk — the walk
58905
+ * (D319).
58906
+ *
58907
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
58908
+ * missing tool is the question, and the dry run is how they sanity-check the
58909
+ * destructive run before authorising it.
58910
+ */
58911
+ var LedgerWalkInputSchema = object({
58912
+ locationId: string().min(1),
58913
+ /** Forget the confirmed-absent rows, rather than only counting them. */
58914
+ apply: boolean().optional(),
58915
+ /** Narrow to one camera. */
58916
+ deviceId: number().int().positive().optional(),
58917
+ /** Narrow to these recording profiles; empty/absent = every profile. */
58918
+ profiles: array(string().min(1)).optional()
58919
+ });
58920
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
58921
+ var LedgerWalkRefusalSchema = _enum([
58922
+ "location-unknown",
58923
+ "source-writable",
58924
+ "no-ledger",
58925
+ "archive-unreadable",
58926
+ "anchor-absent",
58927
+ "anchor-unreadable",
58928
+ "anchor-moved"
58929
+ ]);
58930
+ _enum([
58931
+ "live-tail",
58932
+ "listing-error",
58933
+ "path-mismatch",
58934
+ "durable-refused"
58935
+ ]);
58936
+ /** Every skip reason, always present, always a number — so a reason that never
58937
+ * fired reports as zero rather than absent and the report shape is constant
58938
+ * between passes. Spelled out rather than `z.record` for exactly that. */
58939
+ var LedgerWalkSkipCountsSchema = object({
58940
+ "live-tail": number().int().nonnegative(),
58941
+ "listing-error": number().int().nonnegative(),
58942
+ "path-mismatch": number().int().nonnegative(),
58943
+ "durable-refused": number().int().nonnegative()
58944
+ });
58945
+ /** One camera's share of a walk, so a report names cameras and not rows. */
58946
+ var LedgerWalkDeviceReportSchema = object({
58947
+ deviceId: number().int(),
58948
+ hoursWalked: number().int().nonnegative(),
58949
+ hoursMissing: number().int().nonnegative(),
58950
+ ghostSegments: number().int().nonnegative(),
58951
+ ghostBytes: number().int().nonnegative(),
58952
+ forgottenSegments: number().int().nonnegative(),
58953
+ orphanFiles: number().int().nonnegative()
58954
+ });
58955
+ /**
58956
+ * What one walk claimed, listed, found and (only when armed) forgot.
58957
+ *
58958
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
58959
+ * walk that saw a fraction of the location is visible in its own report rather
58960
+ * than in the absence of one.
58961
+ */
58962
+ var LedgerWalkReportSchema = object({
58963
+ locationId: string(),
58964
+ applied: boolean(),
58965
+ refused: LedgerWalkRefusalSchema.nullable(),
58966
+ archiveSegments: number().int().nonnegative().nullable(),
58967
+ archiveBytes: number().int().nonnegative().nullable(),
58968
+ hoursClaimed: number().int().nonnegative(),
58969
+ hoursWalked: number().int().nonnegative(),
58970
+ hoursMissing: number().int().nonnegative(),
58971
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
58972
+ listings: number().int().nonnegative(),
58973
+ segmentsClaimed: number().int().nonnegative(),
58974
+ ghostSegments: number().int().nonnegative(),
58975
+ ghostBytes: number().int().nonnegative(),
58976
+ ghostHoursWhole: number().int().nonnegative(),
58977
+ forgottenSegments: number().int().nonnegative(),
58978
+ forgottenBytes: number().int().nonnegative(),
58979
+ /** Files under a claimed hour that no durable row names. Never deleted. */
58980
+ orphanFiles: number().int().nonnegative(),
58981
+ orphanSample: array(string()).readonly(),
58982
+ hoursSkipped: number().int().nonnegative(),
58983
+ skippedByReason: LedgerWalkSkipCountsSchema,
58984
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
58985
+ bounded: boolean(),
58986
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
58987
+ });
58889
58988
  /** How many rows a media pass would still act on against a given target — the
58890
58989
  * media lane's denominator AND its residue, from ONE derivation so the two can
58891
58990
  * never disagree. `null` = the count could not be taken. */
@@ -69518,13 +69617,15 @@ var ListGroupsPageSchema = object({
69518
69617
  groups: array(AnalyticsGroupRecordSchema).readonly(),
69519
69618
  nextCursor: string().nullable()
69520
69619
  });
69620
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
69621
+ var KEY_EVENTS_MAX_LIMIT = 200;
69521
69622
  var KeyEventQueryInput = object({
69522
69623
  deviceId: number(),
69523
69624
  /** Window lower bound (track firstSeen ≥ since). */
69524
69625
  since: number(),
69525
69626
  /** Window upper bound (track firstSeen ≤ until). */
69526
69627
  until: number(),
69527
- limit: number().int().min(1).max(200).default(50),
69628
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
69528
69629
  /** Drop tracks scoring below this importance. */
69529
69630
  minImportance: number().min(0).max(1).optional(),
69530
69631
  /** Restrict to a single class (e.g. 'person'). */
@@ -69546,6 +69647,32 @@ var KeyEventSchema = object({
69546
69647
  ...TrackFlagFields,
69547
69648
  ...TrackRetrainFields
69548
69649
  });
69650
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
69651
+ var KeyEventBatchQueryInput = object({
69652
+ deviceIds: array(number()).min(1).max(200),
69653
+ since: number(),
69654
+ until: number(),
69655
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
69656
+ * across the set, which would let a busy camera starve a quiet one of its
69657
+ * rows and change what the merged feed contains. */
69658
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
69659
+ minImportance: number().min(0).max(1).optional(),
69660
+ classFilter: string().optional()
69661
+ });
69662
+ /**
69663
+ * One camera's key events in a batch answer.
69664
+ *
69665
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
69666
+ * error rather than throwing, so a camera whose store read failed and one with
69667
+ * no events in the window were ALREADY indistinguishable per camera — the
69668
+ * batch does not make that worse, and the row keeps the deviceId the single
69669
+ * method's output never carried (the caller used to stamp it from the fan-out
69670
+ * key, which only worked because there was one query per camera).
69671
+ */
69672
+ var KeyEventsForDeviceSchema = object({
69673
+ deviceId: number(),
69674
+ events: array(KeyEventSchema).readonly()
69675
+ });
69549
69676
  object({
69550
69677
  trackId: string(),
69551
69678
  className: string(),
@@ -69815,7 +69942,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
69815
69942
  until: number().optional(),
69816
69943
  kinds: array(string()).optional(),
69817
69944
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
69818
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
69945
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
69819
69946
  deviceId: number(),
69820
69947
  since: number(),
69821
69948
  until: number(),
@@ -79207,6 +79334,9 @@ method(object({
79207
79334
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
79208
79335
  kind: "query",
79209
79336
  auth: "admin"
79337
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
79338
+ kind: "mutation",
79339
+ auth: "admin"
79210
79340
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
79211
79341
  kind: "mutation",
79212
79342
  auth: "admin"
@@ -79598,6 +79728,25 @@ var SceneMonitorStatusSchema = object({
79598
79728
  monitors: array(SceneMonitorSchema),
79599
79729
  lastFetchedAt: number()
79600
79730
  });
79731
+ /**
79732
+ * One camera's row in a `listScenesBatch` answer.
79733
+ *
79734
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
79735
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
79736
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
79737
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
79738
+ * configured. Fanned out per camera the difference was visible — one query
79739
+ * errored while the others resolved — and a batch that returned only the rows
79740
+ * it managed would have destroyed it, silently, by making an unreachable camera
79741
+ * indistinguishable from one that answered `monitors: []`.
79742
+ *
79743
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
79744
+ * could not be read"; `status.monitors: []` means "read, and it has none".
79745
+ */
79746
+ var SceneMonitorStatusForDeviceSchema = object({
79747
+ deviceId: number(),
79748
+ status: SceneMonitorStatusSchema.nullable()
79749
+ });
79601
79750
  var sceneMonitorCapability = {
79602
79751
  name: "scene-monitor",
79603
79752
  scope: "device",
@@ -79607,6 +79756,22 @@ var sceneMonitorCapability = {
79607
79756
  deviceTypes: [DeviceType.Camera],
79608
79757
  methods: {
79609
79758
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
79759
+ /**
79760
+ * The same answer, for a SET of cameras, in one round trip.
79761
+ *
79762
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
79763
+ * poll behind the push slice. Fanned out client-side that was one query
79764
+ * per camera — 29 round trips through the browser, the hub and the
79765
+ * post-analysis runner every 30 seconds to read an in-memory map the
79766
+ * owner had already merged. The work is unchanged (`statusFor` per
79767
+ * device, all in-process at the owner); what collapses is the transport.
79768
+ *
79769
+ * A camera that cannot answer still gets a row, with `status: null` —
79770
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
79771
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
79772
+ * tell which two are missing, or that any are.
79773
+ */
79774
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
79610
79775
  createScene: method(object({
79611
79776
  deviceId: number(),
79612
79777
  label: string(),
@@ -81442,6 +81607,27 @@ var CameraOccupancySnapshotSchema = object({
81442
81607
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
81443
81608
  });
81444
81609
  /**
81610
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
81611
+ *
81612
+ * THREE outcomes, and the single-camera method could only express two of them
81613
+ * because `snapshot: null` was already spoken for:
81614
+ *
81615
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
81616
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
81617
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
81618
+ * - `read: 'unreadable'` — the owner could not answer for this
81619
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
81620
+ *
81621
+ * Collapsing the last two is the failure this field exists to prevent: a
81622
+ * hydration that threw would otherwise render as an empty Stationary section,
81623
+ * which is a definite claim about a camera nobody could read.
81624
+ */
81625
+ var CameraOccupancySnapshotForDeviceSchema = object({
81626
+ deviceId: number(),
81627
+ read: _enum(["read", "unreadable"]),
81628
+ snapshot: CameraOccupancySnapshotSchema.nullable()
81629
+ });
81630
+ /**
81445
81631
  * Time-series resolution. The history methods return one bucket per
81446
81632
  * step over the requested range. Smaller resolutions cost more
81447
81633
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -81498,6 +81684,20 @@ var zoneAnalyticsCapability = {
81498
81684
  * (no inference result emitted since boot or since binding was
81499
81685
  * activated). */
81500
81686
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
81687
+ /**
81688
+ * The same snapshot, for a SET of cameras, in one round trip.
81689
+ *
81690
+ * The Events page's Stationary section polls this every 15s for every
81691
+ * selected camera. Fanned out client-side that is one query per camera to
81692
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
81693
+ * costs everything. Batched, N transports become one and the per-device
81694
+ * work is unchanged.
81695
+ *
81696
+ * Every requested deviceId gets a row, tagged `read` — see
81697
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
81698
+ * not answer for is `'unreadable'`, never an empty reading.
81699
+ */
81700
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
81501
81701
  /** Time-series object count inside one zone. `className` optional —
81502
81702
  * omit to count every class in the zone. */
81503
81703
  getZoneHistory: method(object({
@@ -85919,6 +86119,12 @@ Object.freeze({
85919
86119
  addonId: null,
85920
86120
  access: "view"
85921
86121
  },
86122
+ "pipelineAnalytics.getKeyEventsBatch": {
86123
+ capName: "pipeline-analytics",
86124
+ capScope: "device",
86125
+ addonId: null,
86126
+ access: "view"
86127
+ },
85922
86128
  "pipelineAnalytics.getMotionEvents": {
85923
86129
  capName: "pipeline-analytics",
85924
86130
  capScope: "device",
@@ -87095,6 +87301,12 @@ Object.freeze({
87095
87301
  addonId: null,
87096
87302
  access: "view"
87097
87303
  },
87304
+ "recording.reconcileLedgerAgainstDisk": {
87305
+ capName: "recording",
87306
+ capScope: "system",
87307
+ addonId: null,
87308
+ access: "create"
87309
+ },
87098
87310
  "recording.refreshStorageLocationsForMigration": {
87099
87311
  capName: "recording",
87100
87312
  capScope: "system",
@@ -87221,6 +87433,12 @@ Object.freeze({
87221
87433
  addonId: null,
87222
87434
  access: "view"
87223
87435
  },
87436
+ "sceneMonitor.listScenesBatch": {
87437
+ capName: "scene-monitor",
87438
+ capScope: "device",
87439
+ addonId: null,
87440
+ access: "view"
87441
+ },
87224
87442
  "sceneMonitor.recheckNow": {
87225
87443
  capName: "scene-monitor",
87226
87444
  capScope: "device",
@@ -88577,6 +88795,12 @@ Object.freeze({
88577
88795
  addonId: null,
88578
88796
  access: "view"
88579
88797
  },
88798
+ "zoneAnalytics.getCurrentSnapshotBatch": {
88799
+ capName: "zone-analytics",
88800
+ capScope: "device",
88801
+ addonId: null,
88802
+ access: "view"
88803
+ },
88580
88804
  "zoneAnalytics.getUnzonedHistory": {
88581
88805
  capName: "zone-analytics",
88582
88806
  capScope: "device",
@@ -89581,6 +89805,11 @@ Object.freeze({
89581
89805
  form: "single",
89582
89806
  optional: false
89583
89807
  }],
89808
+ "pipelineAnalytics.getKeyEventsBatch": [{
89809
+ name: "deviceIds",
89810
+ form: "array",
89811
+ optional: false
89812
+ }],
89584
89813
  "pipelineAnalytics.getMotionEvents": [{
89585
89814
  name: "deviceId",
89586
89815
  form: "single",
@@ -90021,6 +90250,11 @@ Object.freeze({
90021
90250
  form: "single",
90022
90251
  optional: false
90023
90252
  }],
90253
+ "recording.reconcileLedgerAgainstDisk": [{
90254
+ name: "deviceId",
90255
+ form: "single",
90256
+ optional: true
90257
+ }],
90024
90258
  "recording.relocateFootage": [{
90025
90259
  name: "deviceId",
90026
90260
  form: "single",
@@ -90086,6 +90320,11 @@ Object.freeze({
90086
90320
  form: "single",
90087
90321
  optional: false
90088
90322
  }],
90323
+ "sceneMonitor.listScenesBatch": [{
90324
+ name: "deviceIds",
90325
+ form: "array",
90326
+ optional: false
90327
+ }],
90089
90328
  "sceneMonitor.recheckNow": [{
90090
90329
  name: "deviceId",
90091
90330
  form: "single",
@@ -90347,6 +90586,11 @@ Object.freeze({
90347
90586
  form: "single",
90348
90587
  optional: false
90349
90588
  }],
90589
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
90590
+ name: "deviceIds",
90591
+ form: "array",
90592
+ optional: false
90593
+ }],
90350
90594
  "zoneAnalytics.getUnzonedHistory": [{
90351
90595
  name: "deviceId",
90352
90596
  form: "single",
package/dist/addon.mjs CHANGED
@@ -58523,6 +58523,20 @@ var RelocateJobSchema = object({
58523
58523
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
58524
58524
  */
58525
58525
  rowsReconciled: number().int().nonnegative().optional(),
58526
+ /**
58527
+ * Rows this run FORGOT because the file they name is not on disk.
58528
+ *
58529
+ * The mover derived the path from the row's own fields and `stat`ed it; an
58530
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
58531
+ * and the durable row is dropped through the same channel eviction uses. It
58532
+ * is reported for the same reason `rowsReconciled` is: this is a durable
58533
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
58534
+ * the same failure as one that quietly skips them (D295).
58535
+ *
58536
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
58537
+ * ledger claimed 5.65 GB of footage that no longer existed.
58538
+ */
58539
+ rowsForgotten: number().int().nonnegative().optional(),
58526
58540
  startedAt: number(),
58527
58541
  finishedAt: number().nullable(),
58528
58542
  error: string().nullable()
@@ -58886,6 +58900,91 @@ var RelocateResidueSchema = object({
58886
58900
  segments: number().int().nonnegative(),
58887
58901
  bytes: number().int().nonnegative()
58888
58902
  }).nullable();
58903
+ /**
58904
+ * Ask one location whether its durable hour rows describe the disk — the walk
58905
+ * (D319).
58906
+ *
58907
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
58908
+ * missing tool is the question, and the dry run is how they sanity-check the
58909
+ * destructive run before authorising it.
58910
+ */
58911
+ var LedgerWalkInputSchema = object({
58912
+ locationId: string().min(1),
58913
+ /** Forget the confirmed-absent rows, rather than only counting them. */
58914
+ apply: boolean().optional(),
58915
+ /** Narrow to one camera. */
58916
+ deviceId: number().int().positive().optional(),
58917
+ /** Narrow to these recording profiles; empty/absent = every profile. */
58918
+ profiles: array(string().min(1)).optional()
58919
+ });
58920
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
58921
+ var LedgerWalkRefusalSchema = _enum([
58922
+ "location-unknown",
58923
+ "source-writable",
58924
+ "no-ledger",
58925
+ "archive-unreadable",
58926
+ "anchor-absent",
58927
+ "anchor-unreadable",
58928
+ "anchor-moved"
58929
+ ]);
58930
+ _enum([
58931
+ "live-tail",
58932
+ "listing-error",
58933
+ "path-mismatch",
58934
+ "durable-refused"
58935
+ ]);
58936
+ /** Every skip reason, always present, always a number — so a reason that never
58937
+ * fired reports as zero rather than absent and the report shape is constant
58938
+ * between passes. Spelled out rather than `z.record` for exactly that. */
58939
+ var LedgerWalkSkipCountsSchema = object({
58940
+ "live-tail": number().int().nonnegative(),
58941
+ "listing-error": number().int().nonnegative(),
58942
+ "path-mismatch": number().int().nonnegative(),
58943
+ "durable-refused": number().int().nonnegative()
58944
+ });
58945
+ /** One camera's share of a walk, so a report names cameras and not rows. */
58946
+ var LedgerWalkDeviceReportSchema = object({
58947
+ deviceId: number().int(),
58948
+ hoursWalked: number().int().nonnegative(),
58949
+ hoursMissing: number().int().nonnegative(),
58950
+ ghostSegments: number().int().nonnegative(),
58951
+ ghostBytes: number().int().nonnegative(),
58952
+ forgottenSegments: number().int().nonnegative(),
58953
+ orphanFiles: number().int().nonnegative()
58954
+ });
58955
+ /**
58956
+ * What one walk claimed, listed, found and (only when armed) forgot.
58957
+ *
58958
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
58959
+ * walk that saw a fraction of the location is visible in its own report rather
58960
+ * than in the absence of one.
58961
+ */
58962
+ var LedgerWalkReportSchema = object({
58963
+ locationId: string(),
58964
+ applied: boolean(),
58965
+ refused: LedgerWalkRefusalSchema.nullable(),
58966
+ archiveSegments: number().int().nonnegative().nullable(),
58967
+ archiveBytes: number().int().nonnegative().nullable(),
58968
+ hoursClaimed: number().int().nonnegative(),
58969
+ hoursWalked: number().int().nonnegative(),
58970
+ hoursMissing: number().int().nonnegative(),
58971
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
58972
+ listings: number().int().nonnegative(),
58973
+ segmentsClaimed: number().int().nonnegative(),
58974
+ ghostSegments: number().int().nonnegative(),
58975
+ ghostBytes: number().int().nonnegative(),
58976
+ ghostHoursWhole: number().int().nonnegative(),
58977
+ forgottenSegments: number().int().nonnegative(),
58978
+ forgottenBytes: number().int().nonnegative(),
58979
+ /** Files under a claimed hour that no durable row names. Never deleted. */
58980
+ orphanFiles: number().int().nonnegative(),
58981
+ orphanSample: array(string()).readonly(),
58982
+ hoursSkipped: number().int().nonnegative(),
58983
+ skippedByReason: LedgerWalkSkipCountsSchema,
58984
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
58985
+ bounded: boolean(),
58986
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
58987
+ });
58889
58988
  /** How many rows a media pass would still act on against a given target — the
58890
58989
  * media lane's denominator AND its residue, from ONE derivation so the two can
58891
58990
  * never disagree. `null` = the count could not be taken. */
@@ -69518,13 +69617,15 @@ var ListGroupsPageSchema = object({
69518
69617
  groups: array(AnalyticsGroupRecordSchema).readonly(),
69519
69618
  nextCursor: string().nullable()
69520
69619
  });
69620
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
69621
+ var KEY_EVENTS_MAX_LIMIT = 200;
69521
69622
  var KeyEventQueryInput = object({
69522
69623
  deviceId: number(),
69523
69624
  /** Window lower bound (track firstSeen ≥ since). */
69524
69625
  since: number(),
69525
69626
  /** Window upper bound (track firstSeen ≤ until). */
69526
69627
  until: number(),
69527
- limit: number().int().min(1).max(200).default(50),
69628
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
69528
69629
  /** Drop tracks scoring below this importance. */
69529
69630
  minImportance: number().min(0).max(1).optional(),
69530
69631
  /** Restrict to a single class (e.g. 'person'). */
@@ -69546,6 +69647,32 @@ var KeyEventSchema = object({
69546
69647
  ...TrackFlagFields,
69547
69648
  ...TrackRetrainFields
69548
69649
  });
69650
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
69651
+ var KeyEventBatchQueryInput = object({
69652
+ deviceIds: array(number()).min(1).max(200),
69653
+ since: number(),
69654
+ until: number(),
69655
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
69656
+ * across the set, which would let a busy camera starve a quiet one of its
69657
+ * rows and change what the merged feed contains. */
69658
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
69659
+ minImportance: number().min(0).max(1).optional(),
69660
+ classFilter: string().optional()
69661
+ });
69662
+ /**
69663
+ * One camera's key events in a batch answer.
69664
+ *
69665
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
69666
+ * error rather than throwing, so a camera whose store read failed and one with
69667
+ * no events in the window were ALREADY indistinguishable per camera — the
69668
+ * batch does not make that worse, and the row keeps the deviceId the single
69669
+ * method's output never carried (the caller used to stamp it from the fan-out
69670
+ * key, which only worked because there was one query per camera).
69671
+ */
69672
+ var KeyEventsForDeviceSchema = object({
69673
+ deviceId: number(),
69674
+ events: array(KeyEventSchema).readonly()
69675
+ });
69549
69676
  object({
69550
69677
  trackId: string(),
69551
69678
  className: string(),
@@ -69815,7 +69942,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
69815
69942
  until: number().optional(),
69816
69943
  kinds: array(string()).optional(),
69817
69944
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
69818
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
69945
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
69819
69946
  deviceId: number(),
69820
69947
  since: number(),
69821
69948
  until: number(),
@@ -79207,6 +79334,9 @@ method(object({
79207
79334
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
79208
79335
  kind: "query",
79209
79336
  auth: "admin"
79337
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
79338
+ kind: "mutation",
79339
+ auth: "admin"
79210
79340
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
79211
79341
  kind: "mutation",
79212
79342
  auth: "admin"
@@ -79598,6 +79728,25 @@ var SceneMonitorStatusSchema = object({
79598
79728
  monitors: array(SceneMonitorSchema),
79599
79729
  lastFetchedAt: number()
79600
79730
  });
79731
+ /**
79732
+ * One camera's row in a `listScenesBatch` answer.
79733
+ *
79734
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
79735
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
79736
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
79737
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
79738
+ * configured. Fanned out per camera the difference was visible — one query
79739
+ * errored while the others resolved — and a batch that returned only the rows
79740
+ * it managed would have destroyed it, silently, by making an unreachable camera
79741
+ * indistinguishable from one that answered `monitors: []`.
79742
+ *
79743
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
79744
+ * could not be read"; `status.monitors: []` means "read, and it has none".
79745
+ */
79746
+ var SceneMonitorStatusForDeviceSchema = object({
79747
+ deviceId: number(),
79748
+ status: SceneMonitorStatusSchema.nullable()
79749
+ });
79601
79750
  var sceneMonitorCapability = {
79602
79751
  name: "scene-monitor",
79603
79752
  scope: "device",
@@ -79607,6 +79756,22 @@ var sceneMonitorCapability = {
79607
79756
  deviceTypes: [DeviceType.Camera],
79608
79757
  methods: {
79609
79758
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
79759
+ /**
79760
+ * The same answer, for a SET of cameras, in one round trip.
79761
+ *
79762
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
79763
+ * poll behind the push slice. Fanned out client-side that was one query
79764
+ * per camera — 29 round trips through the browser, the hub and the
79765
+ * post-analysis runner every 30 seconds to read an in-memory map the
79766
+ * owner had already merged. The work is unchanged (`statusFor` per
79767
+ * device, all in-process at the owner); what collapses is the transport.
79768
+ *
79769
+ * A camera that cannot answer still gets a row, with `status: null` —
79770
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
79771
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
79772
+ * tell which two are missing, or that any are.
79773
+ */
79774
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
79610
79775
  createScene: method(object({
79611
79776
  deviceId: number(),
79612
79777
  label: string(),
@@ -81442,6 +81607,27 @@ var CameraOccupancySnapshotSchema = object({
81442
81607
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
81443
81608
  });
81444
81609
  /**
81610
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
81611
+ *
81612
+ * THREE outcomes, and the single-camera method could only express two of them
81613
+ * because `snapshot: null` was already spoken for:
81614
+ *
81615
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
81616
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
81617
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
81618
+ * - `read: 'unreadable'` — the owner could not answer for this
81619
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
81620
+ *
81621
+ * Collapsing the last two is the failure this field exists to prevent: a
81622
+ * hydration that threw would otherwise render as an empty Stationary section,
81623
+ * which is a definite claim about a camera nobody could read.
81624
+ */
81625
+ var CameraOccupancySnapshotForDeviceSchema = object({
81626
+ deviceId: number(),
81627
+ read: _enum(["read", "unreadable"]),
81628
+ snapshot: CameraOccupancySnapshotSchema.nullable()
81629
+ });
81630
+ /**
81445
81631
  * Time-series resolution. The history methods return one bucket per
81446
81632
  * step over the requested range. Smaller resolutions cost more
81447
81633
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -81498,6 +81684,20 @@ var zoneAnalyticsCapability = {
81498
81684
  * (no inference result emitted since boot or since binding was
81499
81685
  * activated). */
81500
81686
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
81687
+ /**
81688
+ * The same snapshot, for a SET of cameras, in one round trip.
81689
+ *
81690
+ * The Events page's Stationary section polls this every 15s for every
81691
+ * selected camera. Fanned out client-side that is one query per camera to
81692
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
81693
+ * costs everything. Batched, N transports become one and the per-device
81694
+ * work is unchanged.
81695
+ *
81696
+ * Every requested deviceId gets a row, tagged `read` — see
81697
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
81698
+ * not answer for is `'unreadable'`, never an empty reading.
81699
+ */
81700
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
81501
81701
  /** Time-series object count inside one zone. `className` optional —
81502
81702
  * omit to count every class in the zone. */
81503
81703
  getZoneHistory: method(object({
@@ -85919,6 +86119,12 @@ Object.freeze({
85919
86119
  addonId: null,
85920
86120
  access: "view"
85921
86121
  },
86122
+ "pipelineAnalytics.getKeyEventsBatch": {
86123
+ capName: "pipeline-analytics",
86124
+ capScope: "device",
86125
+ addonId: null,
86126
+ access: "view"
86127
+ },
85922
86128
  "pipelineAnalytics.getMotionEvents": {
85923
86129
  capName: "pipeline-analytics",
85924
86130
  capScope: "device",
@@ -87095,6 +87301,12 @@ Object.freeze({
87095
87301
  addonId: null,
87096
87302
  access: "view"
87097
87303
  },
87304
+ "recording.reconcileLedgerAgainstDisk": {
87305
+ capName: "recording",
87306
+ capScope: "system",
87307
+ addonId: null,
87308
+ access: "create"
87309
+ },
87098
87310
  "recording.refreshStorageLocationsForMigration": {
87099
87311
  capName: "recording",
87100
87312
  capScope: "system",
@@ -87221,6 +87433,12 @@ Object.freeze({
87221
87433
  addonId: null,
87222
87434
  access: "view"
87223
87435
  },
87436
+ "sceneMonitor.listScenesBatch": {
87437
+ capName: "scene-monitor",
87438
+ capScope: "device",
87439
+ addonId: null,
87440
+ access: "view"
87441
+ },
87224
87442
  "sceneMonitor.recheckNow": {
87225
87443
  capName: "scene-monitor",
87226
87444
  capScope: "device",
@@ -88577,6 +88795,12 @@ Object.freeze({
88577
88795
  addonId: null,
88578
88796
  access: "view"
88579
88797
  },
88798
+ "zoneAnalytics.getCurrentSnapshotBatch": {
88799
+ capName: "zone-analytics",
88800
+ capScope: "device",
88801
+ addonId: null,
88802
+ access: "view"
88803
+ },
88580
88804
  "zoneAnalytics.getUnzonedHistory": {
88581
88805
  capName: "zone-analytics",
88582
88806
  capScope: "device",
@@ -89581,6 +89805,11 @@ Object.freeze({
89581
89805
  form: "single",
89582
89806
  optional: false
89583
89807
  }],
89808
+ "pipelineAnalytics.getKeyEventsBatch": [{
89809
+ name: "deviceIds",
89810
+ form: "array",
89811
+ optional: false
89812
+ }],
89584
89813
  "pipelineAnalytics.getMotionEvents": [{
89585
89814
  name: "deviceId",
89586
89815
  form: "single",
@@ -90021,6 +90250,11 @@ Object.freeze({
90021
90250
  form: "single",
90022
90251
  optional: false
90023
90252
  }],
90253
+ "recording.reconcileLedgerAgainstDisk": [{
90254
+ name: "deviceId",
90255
+ form: "single",
90256
+ optional: true
90257
+ }],
90024
90258
  "recording.relocateFootage": [{
90025
90259
  name: "deviceId",
90026
90260
  form: "single",
@@ -90086,6 +90320,11 @@ Object.freeze({
90086
90320
  form: "single",
90087
90321
  optional: false
90088
90322
  }],
90323
+ "sceneMonitor.listScenesBatch": [{
90324
+ name: "deviceIds",
90325
+ form: "array",
90326
+ optional: false
90327
+ }],
90089
90328
  "sceneMonitor.recheckNow": [{
90090
90329
  name: "deviceId",
90091
90330
  form: "single",
@@ -90347,6 +90586,11 @@ Object.freeze({
90347
90586
  form: "single",
90348
90587
  optional: false
90349
90588
  }],
90589
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
90590
+ name: "deviceIds",
90591
+ form: "array",
90592
+ optional: false
90593
+ }],
90350
90594
  "zoneAnalytics.getUnzonedHistory": [{
90351
90595
  name: "deviceId",
90352
90596
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.48",
3
+ "version": "0.2.49",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",