@camstack/addon-mqtt-broker 1.1.26 → 1.1.27

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.
@@ -7373,6 +7373,62 @@ var RecordingConfigSchema = object({
7373
7373
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7374
7374
  });
7375
7375
  /**
7376
+ * Ops-log — the durable, append-only operations audit shared by the
7377
+ * recordings and events management surfaces.
7378
+ *
7379
+ * ONE row shape is reused for both domains so a single "Activity" view can
7380
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7381
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7382
+ * management operation, WHY it ran (reason), and its measurable effect
7383
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7384
+ * never fail the operation it records.
7385
+ */
7386
+ /** Which management domain the operation belongs to. */
7387
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7388
+ /** The kind of management operation performed. */
7389
+ var OpsLogOpSchema = _enum([
7390
+ "prune",
7391
+ "manual-delete",
7392
+ "rescan",
7393
+ "retention-run"
7394
+ ]);
7395
+ /** Why the operation ran. */
7396
+ var OpsLogReasonSchema = _enum([
7397
+ "retention",
7398
+ "quota",
7399
+ "manual",
7400
+ "operator"
7401
+ ]);
7402
+ /** One audit row, shared verbatim by both domains. */
7403
+ var OpsLogEntrySchema = object({
7404
+ /** Unique row id. */
7405
+ id: string(),
7406
+ /** Epoch ms the operation completed. */
7407
+ at: number(),
7408
+ domain: OpsLogDomainSchema,
7409
+ op: OpsLogOpSchema,
7410
+ reason: OpsLogReasonSchema,
7411
+ /** The camera the op targeted; null for a cluster/global op. */
7412
+ deviceId: number().nullable(),
7413
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7414
+ nodeId: string(),
7415
+ /** Buckets / rows deleted (op-specific unit). */
7416
+ itemsAffected: number(),
7417
+ /** Bytes reclaimed by the op (0 when not measurable). */
7418
+ bytesReclaimed: number(),
7419
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7420
+ detail: string().nullable(),
7421
+ /** Who/what triggered the op. */
7422
+ actor: string()
7423
+ });
7424
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7425
+ var OpsLogQueryInputSchema = object({
7426
+ /** Restrict to a single camera; omit for every row. */
7427
+ deviceId: number().optional(),
7428
+ /** Max rows returned, newest-first. */
7429
+ limit: number().int().min(1).max(1e3).optional()
7430
+ });
7431
+ /**
7376
7432
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7377
7433
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7378
7434
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16241,6 +16297,26 @@ var TrackCascadeCountsSchema = object({
16241
16297
  /** Per-track CLIP search vectors removed (best-effort). */
16242
16298
  embeddings: number().int()
16243
16299
  });
16300
+ /** Event-store footprint for one camera. */
16301
+ var EventStoreDeviceFootprintSchema = object({
16302
+ deviceId: number(),
16303
+ /** Persisted event rows (motion + object + audio) for the camera. */
16304
+ rows: number().int(),
16305
+ /** Event-owned media bytes on disk for the camera. */
16306
+ bytes: number().int()
16307
+ });
16308
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16309
+ var EventStoreFootprintSchema = object({
16310
+ totalRows: number().int(),
16311
+ totalBytes: number().int(),
16312
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16313
+ });
16314
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16315
+ var EventPruneCountsSchema = object({
16316
+ motion: number().int(),
16317
+ object: number().int(),
16318
+ audio: number().int()
16319
+ });
16244
16320
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16245
16321
  deviceId: number(),
16246
16322
  trackId: string()
@@ -16304,6 +16380,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16304
16380
  }), {
16305
16381
  kind: "mutation",
16306
16382
  auth: "admin"
16383
+ }), method(object({}), EventStoreFootprintSchema, {
16384
+ kind: "query",
16385
+ auth: "admin"
16386
+ }), method(object({
16387
+ olderThanMs: number(),
16388
+ reason: OpsLogReasonSchema.optional()
16389
+ }), EventPruneCountsSchema, {
16390
+ kind: "mutation",
16391
+ auth: "admin"
16392
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16393
+ kind: "mutation",
16394
+ auth: "admin"
16395
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16396
+ kind: "query",
16397
+ auth: "admin"
16307
16398
  }), method(object({
16308
16399
  eventId: string(),
16309
16400
  kind: MediaFileKindEnum.optional()
@@ -19537,13 +19628,29 @@ method(object({
19537
19628
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19538
19629
  kind: "mutation",
19539
19630
  auth: "admin"
19540
- }), method(object({ deviceId: number() }), object({
19631
+ }), method(object({
19632
+ deviceId: number(),
19633
+ reason: OpsLogReasonSchema.optional()
19634
+ }), object({
19541
19635
  floorMs: number().nullable(),
19542
19636
  deletedBuckets: number().int(),
19543
19637
  reclaimedBytes: number().int()
19544
19638
  }), {
19545
19639
  kind: "mutation",
19546
19640
  auth: "admin"
19641
+ }), method(object({
19642
+ deviceId: number(),
19643
+ fromMs: number().optional(),
19644
+ toMs: number().optional()
19645
+ }), object({
19646
+ deletedBuckets: number().int(),
19647
+ reclaimedBytes: number().int()
19648
+ }), {
19649
+ kind: "mutation",
19650
+ auth: "admin"
19651
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19652
+ kind: "query",
19653
+ auth: "admin"
19547
19654
  });
19548
19655
  /**
19549
19656
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22665,6 +22772,12 @@ Object.freeze({
22665
22772
  addonId: null,
22666
22773
  access: "delete"
22667
22774
  },
22775
+ "pipelineAnalytics.deleteDeviceEvents": {
22776
+ capName: "pipeline-analytics",
22777
+ capScope: "device",
22778
+ addonId: null,
22779
+ access: "delete"
22780
+ },
22668
22781
  "pipelineAnalytics.deleteTracks": {
22669
22782
  capName: "pipeline-analytics",
22670
22783
  capScope: "device",
@@ -22695,6 +22808,12 @@ Object.freeze({
22695
22808
  addonId: null,
22696
22809
  access: "view"
22697
22810
  },
22811
+ "pipelineAnalytics.getEventStoreFootprint": {
22812
+ capName: "pipeline-analytics",
22813
+ capScope: "device",
22814
+ addonId: null,
22815
+ access: "view"
22816
+ },
22698
22817
  "pipelineAnalytics.getKeyEvents": {
22699
22818
  capName: "pipeline-analytics",
22700
22819
  capScope: "device",
@@ -22737,6 +22856,12 @@ Object.freeze({
22737
22856
  addonId: null,
22738
22857
  access: "view"
22739
22858
  },
22859
+ "pipelineAnalytics.listOpsLog": {
22860
+ capName: "pipeline-analytics",
22861
+ capScope: "device",
22862
+ addonId: null,
22863
+ access: "view"
22864
+ },
22740
22865
  "pipelineAnalytics.listRecentTracks": {
22741
22866
  capName: "pipeline-analytics",
22742
22867
  capScope: "device",
@@ -22749,6 +22874,12 @@ Object.freeze({
22749
22874
  addonId: null,
22750
22875
  access: "view"
22751
22876
  },
22877
+ "pipelineAnalytics.pruneEvents": {
22878
+ capName: "pipeline-analytics",
22879
+ capScope: "device",
22880
+ addonId: null,
22881
+ access: "create"
22882
+ },
22752
22883
  "pipelineAnalytics.pruneEventsBefore": {
22753
22884
  capName: "pipeline-analytics",
22754
22885
  capScope: "device",
@@ -23511,6 +23642,12 @@ Object.freeze({
23511
23642
  addonId: null,
23512
23643
  access: "create"
23513
23644
  },
23645
+ "recording.deleteFootprint": {
23646
+ capName: "recording",
23647
+ capScope: "system",
23648
+ addonId: null,
23649
+ access: "delete"
23650
+ },
23514
23651
  "recording.getAvailability": {
23515
23652
  capName: "recording",
23516
23653
  capScope: "system",
@@ -23541,6 +23678,12 @@ Object.freeze({
23541
23678
  addonId: null,
23542
23679
  access: "view"
23543
23680
  },
23681
+ "recording.listOpsLog": {
23682
+ capName: "recording",
23683
+ capScope: "system",
23684
+ addonId: null,
23685
+ access: "view"
23686
+ },
23544
23687
  "recording.locateSegment": {
23545
23688
  capName: "recording",
23546
23689
  capScope: "system",
@@ -7368,6 +7368,62 @@ var RecordingConfigSchema = object({
7368
7368
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7369
7369
  });
7370
7370
  /**
7371
+ * Ops-log — the durable, append-only operations audit shared by the
7372
+ * recordings and events management surfaces.
7373
+ *
7374
+ * ONE row shape is reused for both domains so a single "Activity" view can
7375
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7376
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7377
+ * management operation, WHY it ran (reason), and its measurable effect
7378
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7379
+ * never fail the operation it records.
7380
+ */
7381
+ /** Which management domain the operation belongs to. */
7382
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7383
+ /** The kind of management operation performed. */
7384
+ var OpsLogOpSchema = _enum([
7385
+ "prune",
7386
+ "manual-delete",
7387
+ "rescan",
7388
+ "retention-run"
7389
+ ]);
7390
+ /** Why the operation ran. */
7391
+ var OpsLogReasonSchema = _enum([
7392
+ "retention",
7393
+ "quota",
7394
+ "manual",
7395
+ "operator"
7396
+ ]);
7397
+ /** One audit row, shared verbatim by both domains. */
7398
+ var OpsLogEntrySchema = object({
7399
+ /** Unique row id. */
7400
+ id: string(),
7401
+ /** Epoch ms the operation completed. */
7402
+ at: number(),
7403
+ domain: OpsLogDomainSchema,
7404
+ op: OpsLogOpSchema,
7405
+ reason: OpsLogReasonSchema,
7406
+ /** The camera the op targeted; null for a cluster/global op. */
7407
+ deviceId: number().nullable(),
7408
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7409
+ nodeId: string(),
7410
+ /** Buckets / rows deleted (op-specific unit). */
7411
+ itemsAffected: number(),
7412
+ /** Bytes reclaimed by the op (0 when not measurable). */
7413
+ bytesReclaimed: number(),
7414
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7415
+ detail: string().nullable(),
7416
+ /** Who/what triggered the op. */
7417
+ actor: string()
7418
+ });
7419
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7420
+ var OpsLogQueryInputSchema = object({
7421
+ /** Restrict to a single camera; omit for every row. */
7422
+ deviceId: number().optional(),
7423
+ /** Max rows returned, newest-first. */
7424
+ limit: number().int().min(1).max(1e3).optional()
7425
+ });
7426
+ /**
7371
7427
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7372
7428
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7373
7429
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16236,6 +16292,26 @@ var TrackCascadeCountsSchema = object({
16236
16292
  /** Per-track CLIP search vectors removed (best-effort). */
16237
16293
  embeddings: number().int()
16238
16294
  });
16295
+ /** Event-store footprint for one camera. */
16296
+ var EventStoreDeviceFootprintSchema = object({
16297
+ deviceId: number(),
16298
+ /** Persisted event rows (motion + object + audio) for the camera. */
16299
+ rows: number().int(),
16300
+ /** Event-owned media bytes on disk for the camera. */
16301
+ bytes: number().int()
16302
+ });
16303
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16304
+ var EventStoreFootprintSchema = object({
16305
+ totalRows: number().int(),
16306
+ totalBytes: number().int(),
16307
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16308
+ });
16309
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16310
+ var EventPruneCountsSchema = object({
16311
+ motion: number().int(),
16312
+ object: number().int(),
16313
+ audio: number().int()
16314
+ });
16239
16315
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16240
16316
  deviceId: number(),
16241
16317
  trackId: string()
@@ -16299,6 +16375,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16299
16375
  }), {
16300
16376
  kind: "mutation",
16301
16377
  auth: "admin"
16378
+ }), method(object({}), EventStoreFootprintSchema, {
16379
+ kind: "query",
16380
+ auth: "admin"
16381
+ }), method(object({
16382
+ olderThanMs: number(),
16383
+ reason: OpsLogReasonSchema.optional()
16384
+ }), EventPruneCountsSchema, {
16385
+ kind: "mutation",
16386
+ auth: "admin"
16387
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16388
+ kind: "mutation",
16389
+ auth: "admin"
16390
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16391
+ kind: "query",
16392
+ auth: "admin"
16302
16393
  }), method(object({
16303
16394
  eventId: string(),
16304
16395
  kind: MediaFileKindEnum.optional()
@@ -19532,13 +19623,29 @@ method(object({
19532
19623
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19533
19624
  kind: "mutation",
19534
19625
  auth: "admin"
19535
- }), method(object({ deviceId: number() }), object({
19626
+ }), method(object({
19627
+ deviceId: number(),
19628
+ reason: OpsLogReasonSchema.optional()
19629
+ }), object({
19536
19630
  floorMs: number().nullable(),
19537
19631
  deletedBuckets: number().int(),
19538
19632
  reclaimedBytes: number().int()
19539
19633
  }), {
19540
19634
  kind: "mutation",
19541
19635
  auth: "admin"
19636
+ }), method(object({
19637
+ deviceId: number(),
19638
+ fromMs: number().optional(),
19639
+ toMs: number().optional()
19640
+ }), object({
19641
+ deletedBuckets: number().int(),
19642
+ reclaimedBytes: number().int()
19643
+ }), {
19644
+ kind: "mutation",
19645
+ auth: "admin"
19646
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19647
+ kind: "query",
19648
+ auth: "admin"
19542
19649
  });
19543
19650
  /**
19544
19651
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22660,6 +22767,12 @@ Object.freeze({
22660
22767
  addonId: null,
22661
22768
  access: "delete"
22662
22769
  },
22770
+ "pipelineAnalytics.deleteDeviceEvents": {
22771
+ capName: "pipeline-analytics",
22772
+ capScope: "device",
22773
+ addonId: null,
22774
+ access: "delete"
22775
+ },
22663
22776
  "pipelineAnalytics.deleteTracks": {
22664
22777
  capName: "pipeline-analytics",
22665
22778
  capScope: "device",
@@ -22690,6 +22803,12 @@ Object.freeze({
22690
22803
  addonId: null,
22691
22804
  access: "view"
22692
22805
  },
22806
+ "pipelineAnalytics.getEventStoreFootprint": {
22807
+ capName: "pipeline-analytics",
22808
+ capScope: "device",
22809
+ addonId: null,
22810
+ access: "view"
22811
+ },
22693
22812
  "pipelineAnalytics.getKeyEvents": {
22694
22813
  capName: "pipeline-analytics",
22695
22814
  capScope: "device",
@@ -22732,6 +22851,12 @@ Object.freeze({
22732
22851
  addonId: null,
22733
22852
  access: "view"
22734
22853
  },
22854
+ "pipelineAnalytics.listOpsLog": {
22855
+ capName: "pipeline-analytics",
22856
+ capScope: "device",
22857
+ addonId: null,
22858
+ access: "view"
22859
+ },
22735
22860
  "pipelineAnalytics.listRecentTracks": {
22736
22861
  capName: "pipeline-analytics",
22737
22862
  capScope: "device",
@@ -22744,6 +22869,12 @@ Object.freeze({
22744
22869
  addonId: null,
22745
22870
  access: "view"
22746
22871
  },
22872
+ "pipelineAnalytics.pruneEvents": {
22873
+ capName: "pipeline-analytics",
22874
+ capScope: "device",
22875
+ addonId: null,
22876
+ access: "create"
22877
+ },
22747
22878
  "pipelineAnalytics.pruneEventsBefore": {
22748
22879
  capName: "pipeline-analytics",
22749
22880
  capScope: "device",
@@ -23506,6 +23637,12 @@ Object.freeze({
23506
23637
  addonId: null,
23507
23638
  access: "create"
23508
23639
  },
23640
+ "recording.deleteFootprint": {
23641
+ capName: "recording",
23642
+ capScope: "system",
23643
+ addonId: null,
23644
+ access: "delete"
23645
+ },
23509
23646
  "recording.getAvailability": {
23510
23647
  capName: "recording",
23511
23648
  capScope: "system",
@@ -23536,6 +23673,12 @@ Object.freeze({
23536
23673
  addonId: null,
23537
23674
  access: "view"
23538
23675
  },
23676
+ "recording.listOpsLog": {
23677
+ capName: "recording",
23678
+ capScope: "system",
23679
+ addonId: null,
23680
+ access: "view"
23681
+ },
23539
23682
  "recording.locateSegment": {
23540
23683
  capName: "recording",
23541
23684
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",