@camstack/addon-provider-gree 0.2.47 → 0.2.48

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