@camstack/addon-export-hap 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.
@@ -7364,6 +7364,62 @@ var RecordingConfigSchema = object({
7364
7364
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7365
7365
  });
7366
7366
  /**
7367
+ * Ops-log — the durable, append-only operations audit shared by the
7368
+ * recordings and events management surfaces.
7369
+ *
7370
+ * ONE row shape is reused for both domains so a single "Activity" view can
7371
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7372
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7373
+ * management operation, WHY it ran (reason), and its measurable effect
7374
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7375
+ * never fail the operation it records.
7376
+ */
7377
+ /** Which management domain the operation belongs to. */
7378
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7379
+ /** The kind of management operation performed. */
7380
+ var OpsLogOpSchema = _enum([
7381
+ "prune",
7382
+ "manual-delete",
7383
+ "rescan",
7384
+ "retention-run"
7385
+ ]);
7386
+ /** Why the operation ran. */
7387
+ var OpsLogReasonSchema = _enum([
7388
+ "retention",
7389
+ "quota",
7390
+ "manual",
7391
+ "operator"
7392
+ ]);
7393
+ /** One audit row, shared verbatim by both domains. */
7394
+ var OpsLogEntrySchema = object({
7395
+ /** Unique row id. */
7396
+ id: string(),
7397
+ /** Epoch ms the operation completed. */
7398
+ at: number(),
7399
+ domain: OpsLogDomainSchema,
7400
+ op: OpsLogOpSchema,
7401
+ reason: OpsLogReasonSchema,
7402
+ /** The camera the op targeted; null for a cluster/global op. */
7403
+ deviceId: number().nullable(),
7404
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7405
+ nodeId: string(),
7406
+ /** Buckets / rows deleted (op-specific unit). */
7407
+ itemsAffected: number(),
7408
+ /** Bytes reclaimed by the op (0 when not measurable). */
7409
+ bytesReclaimed: number(),
7410
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7411
+ detail: string().nullable(),
7412
+ /** Who/what triggered the op. */
7413
+ actor: string()
7414
+ });
7415
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7416
+ var OpsLogQueryInputSchema = object({
7417
+ /** Restrict to a single camera; omit for every row. */
7418
+ deviceId: number().optional(),
7419
+ /** Max rows returned, newest-first. */
7420
+ limit: number().int().min(1).max(1e3).optional()
7421
+ });
7422
+ /**
7367
7423
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7368
7424
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7369
7425
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16243,6 +16299,26 @@ var TrackCascadeCountsSchema = object({
16243
16299
  /** Per-track CLIP search vectors removed (best-effort). */
16244
16300
  embeddings: number().int()
16245
16301
  });
16302
+ /** Event-store footprint for one camera. */
16303
+ var EventStoreDeviceFootprintSchema = object({
16304
+ deviceId: number(),
16305
+ /** Persisted event rows (motion + object + audio) for the camera. */
16306
+ rows: number().int(),
16307
+ /** Event-owned media bytes on disk for the camera. */
16308
+ bytes: number().int()
16309
+ });
16310
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16311
+ var EventStoreFootprintSchema = object({
16312
+ totalRows: number().int(),
16313
+ totalBytes: number().int(),
16314
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16315
+ });
16316
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16317
+ var EventPruneCountsSchema = object({
16318
+ motion: number().int(),
16319
+ object: number().int(),
16320
+ audio: number().int()
16321
+ });
16246
16322
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16247
16323
  deviceId: number(),
16248
16324
  trackId: string()
@@ -16306,6 +16382,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16306
16382
  }), {
16307
16383
  kind: "mutation",
16308
16384
  auth: "admin"
16385
+ }), method(object({}), EventStoreFootprintSchema, {
16386
+ kind: "query",
16387
+ auth: "admin"
16388
+ }), method(object({
16389
+ olderThanMs: number(),
16390
+ reason: OpsLogReasonSchema.optional()
16391
+ }), EventPruneCountsSchema, {
16392
+ kind: "mutation",
16393
+ auth: "admin"
16394
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16395
+ kind: "mutation",
16396
+ auth: "admin"
16397
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16398
+ kind: "query",
16399
+ auth: "admin"
16309
16400
  }), method(object({
16310
16401
  eventId: string(),
16311
16402
  kind: MediaFileKindEnum.optional()
@@ -19539,13 +19630,29 @@ method(object({
19539
19630
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19540
19631
  kind: "mutation",
19541
19632
  auth: "admin"
19542
- }), method(object({ deviceId: number() }), object({
19633
+ }), method(object({
19634
+ deviceId: number(),
19635
+ reason: OpsLogReasonSchema.optional()
19636
+ }), object({
19543
19637
  floorMs: number().nullable(),
19544
19638
  deletedBuckets: number().int(),
19545
19639
  reclaimedBytes: number().int()
19546
19640
  }), {
19547
19641
  kind: "mutation",
19548
19642
  auth: "admin"
19643
+ }), method(object({
19644
+ deviceId: number(),
19645
+ fromMs: number().optional(),
19646
+ toMs: number().optional()
19647
+ }), object({
19648
+ deletedBuckets: number().int(),
19649
+ reclaimedBytes: number().int()
19650
+ }), {
19651
+ kind: "mutation",
19652
+ auth: "admin"
19653
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19654
+ kind: "query",
19655
+ auth: "admin"
19549
19656
  });
19550
19657
  /**
19551
19658
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22667,6 +22774,12 @@ Object.freeze({
22667
22774
  addonId: null,
22668
22775
  access: "delete"
22669
22776
  },
22777
+ "pipelineAnalytics.deleteDeviceEvents": {
22778
+ capName: "pipeline-analytics",
22779
+ capScope: "device",
22780
+ addonId: null,
22781
+ access: "delete"
22782
+ },
22670
22783
  "pipelineAnalytics.deleteTracks": {
22671
22784
  capName: "pipeline-analytics",
22672
22785
  capScope: "device",
@@ -22697,6 +22810,12 @@ Object.freeze({
22697
22810
  addonId: null,
22698
22811
  access: "view"
22699
22812
  },
22813
+ "pipelineAnalytics.getEventStoreFootprint": {
22814
+ capName: "pipeline-analytics",
22815
+ capScope: "device",
22816
+ addonId: null,
22817
+ access: "view"
22818
+ },
22700
22819
  "pipelineAnalytics.getKeyEvents": {
22701
22820
  capName: "pipeline-analytics",
22702
22821
  capScope: "device",
@@ -22739,6 +22858,12 @@ Object.freeze({
22739
22858
  addonId: null,
22740
22859
  access: "view"
22741
22860
  },
22861
+ "pipelineAnalytics.listOpsLog": {
22862
+ capName: "pipeline-analytics",
22863
+ capScope: "device",
22864
+ addonId: null,
22865
+ access: "view"
22866
+ },
22742
22867
  "pipelineAnalytics.listRecentTracks": {
22743
22868
  capName: "pipeline-analytics",
22744
22869
  capScope: "device",
@@ -22751,6 +22876,12 @@ Object.freeze({
22751
22876
  addonId: null,
22752
22877
  access: "view"
22753
22878
  },
22879
+ "pipelineAnalytics.pruneEvents": {
22880
+ capName: "pipeline-analytics",
22881
+ capScope: "device",
22882
+ addonId: null,
22883
+ access: "create"
22884
+ },
22754
22885
  "pipelineAnalytics.pruneEventsBefore": {
22755
22886
  capName: "pipeline-analytics",
22756
22887
  capScope: "device",
@@ -23513,6 +23644,12 @@ Object.freeze({
23513
23644
  addonId: null,
23514
23645
  access: "create"
23515
23646
  },
23647
+ "recording.deleteFootprint": {
23648
+ capName: "recording",
23649
+ capScope: "system",
23650
+ addonId: null,
23651
+ access: "delete"
23652
+ },
23516
23653
  "recording.getAvailability": {
23517
23654
  capName: "recording",
23518
23655
  capScope: "system",
@@ -23543,6 +23680,12 @@ Object.freeze({
23543
23680
  addonId: null,
23544
23681
  access: "view"
23545
23682
  },
23683
+ "recording.listOpsLog": {
23684
+ capName: "recording",
23685
+ capScope: "system",
23686
+ addonId: null,
23687
+ access: "view"
23688
+ },
23546
23689
  "recording.locateSegment": {
23547
23690
  capName: "recording",
23548
23691
  capScope: "system",
@@ -7339,6 +7339,62 @@ var RecordingConfigSchema = object({
7339
7339
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7340
7340
  });
7341
7341
  /**
7342
+ * Ops-log — the durable, append-only operations audit shared by the
7343
+ * recordings and events management surfaces.
7344
+ *
7345
+ * ONE row shape is reused for both domains so a single "Activity" view can
7346
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7347
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7348
+ * management operation, WHY it ran (reason), and its measurable effect
7349
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7350
+ * never fail the operation it records.
7351
+ */
7352
+ /** Which management domain the operation belongs to. */
7353
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7354
+ /** The kind of management operation performed. */
7355
+ var OpsLogOpSchema = _enum([
7356
+ "prune",
7357
+ "manual-delete",
7358
+ "rescan",
7359
+ "retention-run"
7360
+ ]);
7361
+ /** Why the operation ran. */
7362
+ var OpsLogReasonSchema = _enum([
7363
+ "retention",
7364
+ "quota",
7365
+ "manual",
7366
+ "operator"
7367
+ ]);
7368
+ /** One audit row, shared verbatim by both domains. */
7369
+ var OpsLogEntrySchema = object({
7370
+ /** Unique row id. */
7371
+ id: string(),
7372
+ /** Epoch ms the operation completed. */
7373
+ at: number(),
7374
+ domain: OpsLogDomainSchema,
7375
+ op: OpsLogOpSchema,
7376
+ reason: OpsLogReasonSchema,
7377
+ /** The camera the op targeted; null for a cluster/global op. */
7378
+ deviceId: number().nullable(),
7379
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7380
+ nodeId: string(),
7381
+ /** Buckets / rows deleted (op-specific unit). */
7382
+ itemsAffected: number(),
7383
+ /** Bytes reclaimed by the op (0 when not measurable). */
7384
+ bytesReclaimed: number(),
7385
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7386
+ detail: string().nullable(),
7387
+ /** Who/what triggered the op. */
7388
+ actor: string()
7389
+ });
7390
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7391
+ var OpsLogQueryInputSchema = object({
7392
+ /** Restrict to a single camera; omit for every row. */
7393
+ deviceId: number().optional(),
7394
+ /** Max rows returned, newest-first. */
7395
+ limit: number().int().min(1).max(1e3).optional()
7396
+ });
7397
+ /**
7342
7398
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7343
7399
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7344
7400
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16218,6 +16274,26 @@ var TrackCascadeCountsSchema = object({
16218
16274
  /** Per-track CLIP search vectors removed (best-effort). */
16219
16275
  embeddings: number().int()
16220
16276
  });
16277
+ /** Event-store footprint for one camera. */
16278
+ var EventStoreDeviceFootprintSchema = object({
16279
+ deviceId: number(),
16280
+ /** Persisted event rows (motion + object + audio) for the camera. */
16281
+ rows: number().int(),
16282
+ /** Event-owned media bytes on disk for the camera. */
16283
+ bytes: number().int()
16284
+ });
16285
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16286
+ var EventStoreFootprintSchema = object({
16287
+ totalRows: number().int(),
16288
+ totalBytes: number().int(),
16289
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16290
+ });
16291
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16292
+ var EventPruneCountsSchema = object({
16293
+ motion: number().int(),
16294
+ object: number().int(),
16295
+ audio: number().int()
16296
+ });
16221
16297
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16222
16298
  deviceId: number(),
16223
16299
  trackId: string()
@@ -16281,6 +16357,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16281
16357
  }), {
16282
16358
  kind: "mutation",
16283
16359
  auth: "admin"
16360
+ }), method(object({}), EventStoreFootprintSchema, {
16361
+ kind: "query",
16362
+ auth: "admin"
16363
+ }), method(object({
16364
+ olderThanMs: number(),
16365
+ reason: OpsLogReasonSchema.optional()
16366
+ }), EventPruneCountsSchema, {
16367
+ kind: "mutation",
16368
+ auth: "admin"
16369
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16370
+ kind: "mutation",
16371
+ auth: "admin"
16372
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16373
+ kind: "query",
16374
+ auth: "admin"
16284
16375
  }), method(object({
16285
16376
  eventId: string(),
16286
16377
  kind: MediaFileKindEnum.optional()
@@ -19514,13 +19605,29 @@ method(object({
19514
19605
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19515
19606
  kind: "mutation",
19516
19607
  auth: "admin"
19517
- }), method(object({ deviceId: number() }), object({
19608
+ }), method(object({
19609
+ deviceId: number(),
19610
+ reason: OpsLogReasonSchema.optional()
19611
+ }), object({
19518
19612
  floorMs: number().nullable(),
19519
19613
  deletedBuckets: number().int(),
19520
19614
  reclaimedBytes: number().int()
19521
19615
  }), {
19522
19616
  kind: "mutation",
19523
19617
  auth: "admin"
19618
+ }), method(object({
19619
+ deviceId: number(),
19620
+ fromMs: number().optional(),
19621
+ toMs: number().optional()
19622
+ }), object({
19623
+ deletedBuckets: number().int(),
19624
+ reclaimedBytes: number().int()
19625
+ }), {
19626
+ kind: "mutation",
19627
+ auth: "admin"
19628
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19629
+ kind: "query",
19630
+ auth: "admin"
19524
19631
  });
19525
19632
  /**
19526
19633
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22642,6 +22749,12 @@ Object.freeze({
22642
22749
  addonId: null,
22643
22750
  access: "delete"
22644
22751
  },
22752
+ "pipelineAnalytics.deleteDeviceEvents": {
22753
+ capName: "pipeline-analytics",
22754
+ capScope: "device",
22755
+ addonId: null,
22756
+ access: "delete"
22757
+ },
22645
22758
  "pipelineAnalytics.deleteTracks": {
22646
22759
  capName: "pipeline-analytics",
22647
22760
  capScope: "device",
@@ -22672,6 +22785,12 @@ Object.freeze({
22672
22785
  addonId: null,
22673
22786
  access: "view"
22674
22787
  },
22788
+ "pipelineAnalytics.getEventStoreFootprint": {
22789
+ capName: "pipeline-analytics",
22790
+ capScope: "device",
22791
+ addonId: null,
22792
+ access: "view"
22793
+ },
22675
22794
  "pipelineAnalytics.getKeyEvents": {
22676
22795
  capName: "pipeline-analytics",
22677
22796
  capScope: "device",
@@ -22714,6 +22833,12 @@ Object.freeze({
22714
22833
  addonId: null,
22715
22834
  access: "view"
22716
22835
  },
22836
+ "pipelineAnalytics.listOpsLog": {
22837
+ capName: "pipeline-analytics",
22838
+ capScope: "device",
22839
+ addonId: null,
22840
+ access: "view"
22841
+ },
22717
22842
  "pipelineAnalytics.listRecentTracks": {
22718
22843
  capName: "pipeline-analytics",
22719
22844
  capScope: "device",
@@ -22726,6 +22851,12 @@ Object.freeze({
22726
22851
  addonId: null,
22727
22852
  access: "view"
22728
22853
  },
22854
+ "pipelineAnalytics.pruneEvents": {
22855
+ capName: "pipeline-analytics",
22856
+ capScope: "device",
22857
+ addonId: null,
22858
+ access: "create"
22859
+ },
22729
22860
  "pipelineAnalytics.pruneEventsBefore": {
22730
22861
  capName: "pipeline-analytics",
22731
22862
  capScope: "device",
@@ -23488,6 +23619,12 @@ Object.freeze({
23488
23619
  addonId: null,
23489
23620
  access: "create"
23490
23621
  },
23622
+ "recording.deleteFootprint": {
23623
+ capName: "recording",
23624
+ capScope: "system",
23625
+ addonId: null,
23626
+ access: "delete"
23627
+ },
23491
23628
  "recording.getAvailability": {
23492
23629
  capName: "recording",
23493
23630
  capScope: "system",
@@ -23518,6 +23655,12 @@ Object.freeze({
23518
23655
  addonId: null,
23519
23656
  access: "view"
23520
23657
  },
23658
+ "recording.listOpsLog": {
23659
+ capName: "recording",
23660
+ capScope: "system",
23661
+ addonId: null,
23662
+ access: "view"
23663
+ },
23521
23664
  "recording.locateSegment": {
23522
23665
  capName: "recording",
23523
23666
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "HomeKit (HAP) bridge exporter for CamStack devices. Publishes a bridged accessory per exposed device — MotionSensor in this MVP; Camera/Doorbell/Switch/Light follow.",
5
5
  "keywords": [
6
6
  "camstack",