@camstack/addon-provider-reolink 1.1.28 → 1.1.29

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
@@ -7558,6 +7558,62 @@ var RecordingConfigSchema = object({
7558
7558
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7559
7559
  });
7560
7560
  /**
7561
+ * Ops-log — the durable, append-only operations audit shared by the
7562
+ * recordings and events management surfaces.
7563
+ *
7564
+ * ONE row shape is reused for both domains so a single "Activity" view can
7565
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7566
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7567
+ * management operation, WHY it ran (reason), and its measurable effect
7568
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7569
+ * never fail the operation it records.
7570
+ */
7571
+ /** Which management domain the operation belongs to. */
7572
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7573
+ /** The kind of management operation performed. */
7574
+ var OpsLogOpSchema = _enum([
7575
+ "prune",
7576
+ "manual-delete",
7577
+ "rescan",
7578
+ "retention-run"
7579
+ ]);
7580
+ /** Why the operation ran. */
7581
+ var OpsLogReasonSchema = _enum([
7582
+ "retention",
7583
+ "quota",
7584
+ "manual",
7585
+ "operator"
7586
+ ]);
7587
+ /** One audit row, shared verbatim by both domains. */
7588
+ var OpsLogEntrySchema = object({
7589
+ /** Unique row id. */
7590
+ id: string(),
7591
+ /** Epoch ms the operation completed. */
7592
+ at: number(),
7593
+ domain: OpsLogDomainSchema,
7594
+ op: OpsLogOpSchema,
7595
+ reason: OpsLogReasonSchema,
7596
+ /** The camera the op targeted; null for a cluster/global op. */
7597
+ deviceId: number().nullable(),
7598
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7599
+ nodeId: string(),
7600
+ /** Buckets / rows deleted (op-specific unit). */
7601
+ itemsAffected: number(),
7602
+ /** Bytes reclaimed by the op (0 when not measurable). */
7603
+ bytesReclaimed: number(),
7604
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7605
+ detail: string().nullable(),
7606
+ /** Who/what triggered the op. */
7607
+ actor: string()
7608
+ });
7609
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7610
+ var OpsLogQueryInputSchema = object({
7611
+ /** Restrict to a single camera; omit for every row. */
7612
+ deviceId: number().optional(),
7613
+ /** Max rows returned, newest-first. */
7614
+ limit: number().int().min(1).max(1e3).optional()
7615
+ });
7616
+ /**
7561
7617
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7562
7618
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7563
7619
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -15060,9 +15116,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
15060
15116
  * `package` backs the package-drop detector — a package zone is a
15061
15117
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
15062
15118
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
15063
- * The orchestrator provider that writes this stage lands in a later
15064
- * slice; until then the mirror carries only `{motion, detection}` and
15065
- * consumers read `package` as absent (treat as `[]`).
15119
+ * The orchestrator provider writes this stage as a first-class slice
15120
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
15121
+ * package}` shape, so consumers read the current package rules directly
15122
+ * off `device.state.zoneRules.value.package`.
15066
15123
  */
15067
15124
  runtimeState: object({
15068
15125
  motion: array(ZoneRuleSchema).readonly(),
@@ -19391,6 +19448,26 @@ var TrackCascadeCountsSchema = object({
19391
19448
  /** Per-track CLIP search vectors removed (best-effort). */
19392
19449
  embeddings: number().int()
19393
19450
  });
19451
+ /** Event-store footprint for one camera. */
19452
+ var EventStoreDeviceFootprintSchema = object({
19453
+ deviceId: number(),
19454
+ /** Persisted event rows (motion + object + audio) for the camera. */
19455
+ rows: number().int(),
19456
+ /** Event-owned media bytes on disk for the camera. */
19457
+ bytes: number().int()
19458
+ });
19459
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19460
+ var EventStoreFootprintSchema = object({
19461
+ totalRows: number().int(),
19462
+ totalBytes: number().int(),
19463
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19464
+ });
19465
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19466
+ var EventPruneCountsSchema = object({
19467
+ motion: number().int(),
19468
+ object: number().int(),
19469
+ audio: number().int()
19470
+ });
19394
19471
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19395
19472
  deviceId: number(),
19396
19473
  trackId: string()
@@ -19454,6 +19531,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19454
19531
  }), {
19455
19532
  kind: "mutation",
19456
19533
  auth: "admin"
19534
+ }), method(object({}), EventStoreFootprintSchema, {
19535
+ kind: "query",
19536
+ auth: "admin"
19537
+ }), method(object({
19538
+ olderThanMs: number(),
19539
+ reason: OpsLogReasonSchema.optional()
19540
+ }), EventPruneCountsSchema, {
19541
+ kind: "mutation",
19542
+ auth: "admin"
19543
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19544
+ kind: "mutation",
19545
+ auth: "admin"
19546
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19547
+ kind: "query",
19548
+ auth: "admin"
19457
19549
  }), method(object({
19458
19550
  eventId: string(),
19459
19551
  kind: MediaFileKindEnum.optional()
@@ -22856,13 +22948,29 @@ method(object({
22856
22948
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22857
22949
  kind: "mutation",
22858
22950
  auth: "admin"
22859
- }), method(object({ deviceId: number() }), object({
22951
+ }), method(object({
22952
+ deviceId: number(),
22953
+ reason: OpsLogReasonSchema.optional()
22954
+ }), object({
22860
22955
  floorMs: number().nullable(),
22861
22956
  deletedBuckets: number().int(),
22862
22957
  reclaimedBytes: number().int()
22863
22958
  }), {
22864
22959
  kind: "mutation",
22865
22960
  auth: "admin"
22961
+ }), method(object({
22962
+ deviceId: number(),
22963
+ fromMs: number().optional(),
22964
+ toMs: number().optional()
22965
+ }), object({
22966
+ deletedBuckets: number().int(),
22967
+ reclaimedBytes: number().int()
22968
+ }), {
22969
+ kind: "mutation",
22970
+ auth: "admin"
22971
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22972
+ kind: "query",
22973
+ auth: "admin"
22866
22974
  });
22867
22975
  /**
22868
22976
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -26195,6 +26303,12 @@ Object.freeze({
26195
26303
  addonId: null,
26196
26304
  access: "delete"
26197
26305
  },
26306
+ "pipelineAnalytics.deleteDeviceEvents": {
26307
+ capName: "pipeline-analytics",
26308
+ capScope: "device",
26309
+ addonId: null,
26310
+ access: "delete"
26311
+ },
26198
26312
  "pipelineAnalytics.deleteTracks": {
26199
26313
  capName: "pipeline-analytics",
26200
26314
  capScope: "device",
@@ -26225,6 +26339,12 @@ Object.freeze({
26225
26339
  addonId: null,
26226
26340
  access: "view"
26227
26341
  },
26342
+ "pipelineAnalytics.getEventStoreFootprint": {
26343
+ capName: "pipeline-analytics",
26344
+ capScope: "device",
26345
+ addonId: null,
26346
+ access: "view"
26347
+ },
26228
26348
  "pipelineAnalytics.getKeyEvents": {
26229
26349
  capName: "pipeline-analytics",
26230
26350
  capScope: "device",
@@ -26267,6 +26387,12 @@ Object.freeze({
26267
26387
  addonId: null,
26268
26388
  access: "view"
26269
26389
  },
26390
+ "pipelineAnalytics.listOpsLog": {
26391
+ capName: "pipeline-analytics",
26392
+ capScope: "device",
26393
+ addonId: null,
26394
+ access: "view"
26395
+ },
26270
26396
  "pipelineAnalytics.listRecentTracks": {
26271
26397
  capName: "pipeline-analytics",
26272
26398
  capScope: "device",
@@ -26279,6 +26405,12 @@ Object.freeze({
26279
26405
  addonId: null,
26280
26406
  access: "view"
26281
26407
  },
26408
+ "pipelineAnalytics.pruneEvents": {
26409
+ capName: "pipeline-analytics",
26410
+ capScope: "device",
26411
+ addonId: null,
26412
+ access: "create"
26413
+ },
26282
26414
  "pipelineAnalytics.pruneEventsBefore": {
26283
26415
  capName: "pipeline-analytics",
26284
26416
  capScope: "device",
@@ -27041,6 +27173,12 @@ Object.freeze({
27041
27173
  addonId: null,
27042
27174
  access: "create"
27043
27175
  },
27176
+ "recording.deleteFootprint": {
27177
+ capName: "recording",
27178
+ capScope: "system",
27179
+ addonId: null,
27180
+ access: "delete"
27181
+ },
27044
27182
  "recording.getAvailability": {
27045
27183
  capName: "recording",
27046
27184
  capScope: "system",
@@ -27071,6 +27209,12 @@ Object.freeze({
27071
27209
  addonId: null,
27072
27210
  access: "view"
27073
27211
  },
27212
+ "recording.listOpsLog": {
27213
+ capName: "recording",
27214
+ capScope: "system",
27215
+ addonId: null,
27216
+ access: "view"
27217
+ },
27074
27218
  "recording.locateSegment": {
27075
27219
  capName: "recording",
27076
27220
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7553,6 +7553,62 @@ var RecordingConfigSchema = object({
7553
7553
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7554
7554
  });
7555
7555
  /**
7556
+ * Ops-log — the durable, append-only operations audit shared by the
7557
+ * recordings and events management surfaces.
7558
+ *
7559
+ * ONE row shape is reused for both domains so a single "Activity" view can
7560
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7561
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7562
+ * management operation, WHY it ran (reason), and its measurable effect
7563
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7564
+ * never fail the operation it records.
7565
+ */
7566
+ /** Which management domain the operation belongs to. */
7567
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7568
+ /** The kind of management operation performed. */
7569
+ var OpsLogOpSchema = _enum([
7570
+ "prune",
7571
+ "manual-delete",
7572
+ "rescan",
7573
+ "retention-run"
7574
+ ]);
7575
+ /** Why the operation ran. */
7576
+ var OpsLogReasonSchema = _enum([
7577
+ "retention",
7578
+ "quota",
7579
+ "manual",
7580
+ "operator"
7581
+ ]);
7582
+ /** One audit row, shared verbatim by both domains. */
7583
+ var OpsLogEntrySchema = object({
7584
+ /** Unique row id. */
7585
+ id: string(),
7586
+ /** Epoch ms the operation completed. */
7587
+ at: number(),
7588
+ domain: OpsLogDomainSchema,
7589
+ op: OpsLogOpSchema,
7590
+ reason: OpsLogReasonSchema,
7591
+ /** The camera the op targeted; null for a cluster/global op. */
7592
+ deviceId: number().nullable(),
7593
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7594
+ nodeId: string(),
7595
+ /** Buckets / rows deleted (op-specific unit). */
7596
+ itemsAffected: number(),
7597
+ /** Bytes reclaimed by the op (0 when not measurable). */
7598
+ bytesReclaimed: number(),
7599
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7600
+ detail: string().nullable(),
7601
+ /** Who/what triggered the op. */
7602
+ actor: string()
7603
+ });
7604
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7605
+ var OpsLogQueryInputSchema = object({
7606
+ /** Restrict to a single camera; omit for every row. */
7607
+ deviceId: number().optional(),
7608
+ /** Max rows returned, newest-first. */
7609
+ limit: number().int().min(1).max(1e3).optional()
7610
+ });
7611
+ /**
7556
7612
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7557
7613
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7558
7614
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -15055,9 +15111,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
15055
15111
  * `package` backs the package-drop detector — a package zone is a
15056
15112
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
15057
15113
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
15058
- * The orchestrator provider that writes this stage lands in a later
15059
- * slice; until then the mirror carries only `{motion, detection}` and
15060
- * consumers read `package` as absent (treat as `[]`).
15114
+ * The orchestrator provider writes this stage as a first-class slice
15115
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
15116
+ * package}` shape, so consumers read the current package rules directly
15117
+ * off `device.state.zoneRules.value.package`.
15061
15118
  */
15062
15119
  runtimeState: object({
15063
15120
  motion: array(ZoneRuleSchema).readonly(),
@@ -19386,6 +19443,26 @@ var TrackCascadeCountsSchema = object({
19386
19443
  /** Per-track CLIP search vectors removed (best-effort). */
19387
19444
  embeddings: number().int()
19388
19445
  });
19446
+ /** Event-store footprint for one camera. */
19447
+ var EventStoreDeviceFootprintSchema = object({
19448
+ deviceId: number(),
19449
+ /** Persisted event rows (motion + object + audio) for the camera. */
19450
+ rows: number().int(),
19451
+ /** Event-owned media bytes on disk for the camera. */
19452
+ bytes: number().int()
19453
+ });
19454
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19455
+ var EventStoreFootprintSchema = object({
19456
+ totalRows: number().int(),
19457
+ totalBytes: number().int(),
19458
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19459
+ });
19460
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19461
+ var EventPruneCountsSchema = object({
19462
+ motion: number().int(),
19463
+ object: number().int(),
19464
+ audio: number().int()
19465
+ });
19389
19466
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19390
19467
  deviceId: number(),
19391
19468
  trackId: string()
@@ -19449,6 +19526,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19449
19526
  }), {
19450
19527
  kind: "mutation",
19451
19528
  auth: "admin"
19529
+ }), method(object({}), EventStoreFootprintSchema, {
19530
+ kind: "query",
19531
+ auth: "admin"
19532
+ }), method(object({
19533
+ olderThanMs: number(),
19534
+ reason: OpsLogReasonSchema.optional()
19535
+ }), EventPruneCountsSchema, {
19536
+ kind: "mutation",
19537
+ auth: "admin"
19538
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19539
+ kind: "mutation",
19540
+ auth: "admin"
19541
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19542
+ kind: "query",
19543
+ auth: "admin"
19452
19544
  }), method(object({
19453
19545
  eventId: string(),
19454
19546
  kind: MediaFileKindEnum.optional()
@@ -22851,13 +22943,29 @@ method(object({
22851
22943
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22852
22944
  kind: "mutation",
22853
22945
  auth: "admin"
22854
- }), method(object({ deviceId: number() }), object({
22946
+ }), method(object({
22947
+ deviceId: number(),
22948
+ reason: OpsLogReasonSchema.optional()
22949
+ }), object({
22855
22950
  floorMs: number().nullable(),
22856
22951
  deletedBuckets: number().int(),
22857
22952
  reclaimedBytes: number().int()
22858
22953
  }), {
22859
22954
  kind: "mutation",
22860
22955
  auth: "admin"
22956
+ }), method(object({
22957
+ deviceId: number(),
22958
+ fromMs: number().optional(),
22959
+ toMs: number().optional()
22960
+ }), object({
22961
+ deletedBuckets: number().int(),
22962
+ reclaimedBytes: number().int()
22963
+ }), {
22964
+ kind: "mutation",
22965
+ auth: "admin"
22966
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22967
+ kind: "query",
22968
+ auth: "admin"
22861
22969
  });
22862
22970
  /**
22863
22971
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -26190,6 +26298,12 @@ Object.freeze({
26190
26298
  addonId: null,
26191
26299
  access: "delete"
26192
26300
  },
26301
+ "pipelineAnalytics.deleteDeviceEvents": {
26302
+ capName: "pipeline-analytics",
26303
+ capScope: "device",
26304
+ addonId: null,
26305
+ access: "delete"
26306
+ },
26193
26307
  "pipelineAnalytics.deleteTracks": {
26194
26308
  capName: "pipeline-analytics",
26195
26309
  capScope: "device",
@@ -26220,6 +26334,12 @@ Object.freeze({
26220
26334
  addonId: null,
26221
26335
  access: "view"
26222
26336
  },
26337
+ "pipelineAnalytics.getEventStoreFootprint": {
26338
+ capName: "pipeline-analytics",
26339
+ capScope: "device",
26340
+ addonId: null,
26341
+ access: "view"
26342
+ },
26223
26343
  "pipelineAnalytics.getKeyEvents": {
26224
26344
  capName: "pipeline-analytics",
26225
26345
  capScope: "device",
@@ -26262,6 +26382,12 @@ Object.freeze({
26262
26382
  addonId: null,
26263
26383
  access: "view"
26264
26384
  },
26385
+ "pipelineAnalytics.listOpsLog": {
26386
+ capName: "pipeline-analytics",
26387
+ capScope: "device",
26388
+ addonId: null,
26389
+ access: "view"
26390
+ },
26265
26391
  "pipelineAnalytics.listRecentTracks": {
26266
26392
  capName: "pipeline-analytics",
26267
26393
  capScope: "device",
@@ -26274,6 +26400,12 @@ Object.freeze({
26274
26400
  addonId: null,
26275
26401
  access: "view"
26276
26402
  },
26403
+ "pipelineAnalytics.pruneEvents": {
26404
+ capName: "pipeline-analytics",
26405
+ capScope: "device",
26406
+ addonId: null,
26407
+ access: "create"
26408
+ },
26277
26409
  "pipelineAnalytics.pruneEventsBefore": {
26278
26410
  capName: "pipeline-analytics",
26279
26411
  capScope: "device",
@@ -27036,6 +27168,12 @@ Object.freeze({
27036
27168
  addonId: null,
27037
27169
  access: "create"
27038
27170
  },
27171
+ "recording.deleteFootprint": {
27172
+ capName: "recording",
27173
+ capScope: "system",
27174
+ addonId: null,
27175
+ access: "delete"
27176
+ },
27039
27177
  "recording.getAvailability": {
27040
27178
  capName: "recording",
27041
27179
  capScope: "system",
@@ -27066,6 +27204,12 @@ Object.freeze({
27066
27204
  addonId: null,
27067
27205
  access: "view"
27068
27206
  },
27207
+ "recording.listOpsLog": {
27208
+ capName: "recording",
27209
+ capScope: "system",
27210
+ addonId: null,
27211
+ access: "view"
27212
+ },
27069
27213
  "recording.locateSegment": {
27070
27214
  capName: "recording",
27071
27215
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",