@camstack/addon-decoder-nodeav 1.1.16 → 1.1.17

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/index.js CHANGED
@@ -7344,6 +7344,62 @@ var RecordingConfigSchema = object({
7344
7344
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7345
7345
  });
7346
7346
  /**
7347
+ * Ops-log — the durable, append-only operations audit shared by the
7348
+ * recordings and events management surfaces.
7349
+ *
7350
+ * ONE row shape is reused for both domains so a single "Activity" view can
7351
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7352
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7353
+ * management operation, WHY it ran (reason), and its measurable effect
7354
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7355
+ * never fail the operation it records.
7356
+ */
7357
+ /** Which management domain the operation belongs to. */
7358
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7359
+ /** The kind of management operation performed. */
7360
+ var OpsLogOpSchema = _enum([
7361
+ "prune",
7362
+ "manual-delete",
7363
+ "rescan",
7364
+ "retention-run"
7365
+ ]);
7366
+ /** Why the operation ran. */
7367
+ var OpsLogReasonSchema = _enum([
7368
+ "retention",
7369
+ "quota",
7370
+ "manual",
7371
+ "operator"
7372
+ ]);
7373
+ /** One audit row, shared verbatim by both domains. */
7374
+ var OpsLogEntrySchema = object({
7375
+ /** Unique row id. */
7376
+ id: string(),
7377
+ /** Epoch ms the operation completed. */
7378
+ at: number(),
7379
+ domain: OpsLogDomainSchema,
7380
+ op: OpsLogOpSchema,
7381
+ reason: OpsLogReasonSchema,
7382
+ /** The camera the op targeted; null for a cluster/global op. */
7383
+ deviceId: number().nullable(),
7384
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7385
+ nodeId: string(),
7386
+ /** Buckets / rows deleted (op-specific unit). */
7387
+ itemsAffected: number(),
7388
+ /** Bytes reclaimed by the op (0 when not measurable). */
7389
+ bytesReclaimed: number(),
7390
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7391
+ detail: string().nullable(),
7392
+ /** Who/what triggered the op. */
7393
+ actor: string()
7394
+ });
7395
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7396
+ var OpsLogQueryInputSchema = object({
7397
+ /** Restrict to a single camera; omit for every row. */
7398
+ deviceId: number().optional(),
7399
+ /** Max rows returned, newest-first. */
7400
+ limit: number().int().min(1).max(1e3).optional()
7401
+ });
7402
+ /**
7347
7403
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7348
7404
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7349
7405
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16274,6 +16330,26 @@ var TrackCascadeCountsSchema = object({
16274
16330
  /** Per-track CLIP search vectors removed (best-effort). */
16275
16331
  embeddings: number().int()
16276
16332
  });
16333
+ /** Event-store footprint for one camera. */
16334
+ var EventStoreDeviceFootprintSchema = object({
16335
+ deviceId: number(),
16336
+ /** Persisted event rows (motion + object + audio) for the camera. */
16337
+ rows: number().int(),
16338
+ /** Event-owned media bytes on disk for the camera. */
16339
+ bytes: number().int()
16340
+ });
16341
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16342
+ var EventStoreFootprintSchema = object({
16343
+ totalRows: number().int(),
16344
+ totalBytes: number().int(),
16345
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16346
+ });
16347
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16348
+ var EventPruneCountsSchema = object({
16349
+ motion: number().int(),
16350
+ object: number().int(),
16351
+ audio: number().int()
16352
+ });
16277
16353
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16278
16354
  deviceId: number(),
16279
16355
  trackId: string()
@@ -16337,6 +16413,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16337
16413
  }), {
16338
16414
  kind: "mutation",
16339
16415
  auth: "admin"
16416
+ }), method(object({}), EventStoreFootprintSchema, {
16417
+ kind: "query",
16418
+ auth: "admin"
16419
+ }), method(object({
16420
+ olderThanMs: number(),
16421
+ reason: OpsLogReasonSchema.optional()
16422
+ }), EventPruneCountsSchema, {
16423
+ kind: "mutation",
16424
+ auth: "admin"
16425
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16426
+ kind: "mutation",
16427
+ auth: "admin"
16428
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16429
+ kind: "query",
16430
+ auth: "admin"
16340
16431
  }), method(object({
16341
16432
  eventId: string(),
16342
16433
  kind: MediaFileKindEnum.optional()
@@ -19570,13 +19661,29 @@ method(object({
19570
19661
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19571
19662
  kind: "mutation",
19572
19663
  auth: "admin"
19573
- }), method(object({ deviceId: number() }), object({
19664
+ }), method(object({
19665
+ deviceId: number(),
19666
+ reason: OpsLogReasonSchema.optional()
19667
+ }), object({
19574
19668
  floorMs: number().nullable(),
19575
19669
  deletedBuckets: number().int(),
19576
19670
  reclaimedBytes: number().int()
19577
19671
  }), {
19578
19672
  kind: "mutation",
19579
19673
  auth: "admin"
19674
+ }), method(object({
19675
+ deviceId: number(),
19676
+ fromMs: number().optional(),
19677
+ toMs: number().optional()
19678
+ }), object({
19679
+ deletedBuckets: number().int(),
19680
+ reclaimedBytes: number().int()
19681
+ }), {
19682
+ kind: "mutation",
19683
+ auth: "admin"
19684
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19685
+ kind: "query",
19686
+ auth: "admin"
19580
19687
  });
19581
19688
  /**
19582
19689
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22698,6 +22805,12 @@ Object.freeze({
22698
22805
  addonId: null,
22699
22806
  access: "delete"
22700
22807
  },
22808
+ "pipelineAnalytics.deleteDeviceEvents": {
22809
+ capName: "pipeline-analytics",
22810
+ capScope: "device",
22811
+ addonId: null,
22812
+ access: "delete"
22813
+ },
22701
22814
  "pipelineAnalytics.deleteTracks": {
22702
22815
  capName: "pipeline-analytics",
22703
22816
  capScope: "device",
@@ -22728,6 +22841,12 @@ Object.freeze({
22728
22841
  addonId: null,
22729
22842
  access: "view"
22730
22843
  },
22844
+ "pipelineAnalytics.getEventStoreFootprint": {
22845
+ capName: "pipeline-analytics",
22846
+ capScope: "device",
22847
+ addonId: null,
22848
+ access: "view"
22849
+ },
22731
22850
  "pipelineAnalytics.getKeyEvents": {
22732
22851
  capName: "pipeline-analytics",
22733
22852
  capScope: "device",
@@ -22770,6 +22889,12 @@ Object.freeze({
22770
22889
  addonId: null,
22771
22890
  access: "view"
22772
22891
  },
22892
+ "pipelineAnalytics.listOpsLog": {
22893
+ capName: "pipeline-analytics",
22894
+ capScope: "device",
22895
+ addonId: null,
22896
+ access: "view"
22897
+ },
22773
22898
  "pipelineAnalytics.listRecentTracks": {
22774
22899
  capName: "pipeline-analytics",
22775
22900
  capScope: "device",
@@ -22782,6 +22907,12 @@ Object.freeze({
22782
22907
  addonId: null,
22783
22908
  access: "view"
22784
22909
  },
22910
+ "pipelineAnalytics.pruneEvents": {
22911
+ capName: "pipeline-analytics",
22912
+ capScope: "device",
22913
+ addonId: null,
22914
+ access: "create"
22915
+ },
22785
22916
  "pipelineAnalytics.pruneEventsBefore": {
22786
22917
  capName: "pipeline-analytics",
22787
22918
  capScope: "device",
@@ -23544,6 +23675,12 @@ Object.freeze({
23544
23675
  addonId: null,
23545
23676
  access: "create"
23546
23677
  },
23678
+ "recording.deleteFootprint": {
23679
+ capName: "recording",
23680
+ capScope: "system",
23681
+ addonId: null,
23682
+ access: "delete"
23683
+ },
23547
23684
  "recording.getAvailability": {
23548
23685
  capName: "recording",
23549
23686
  capScope: "system",
@@ -23574,6 +23711,12 @@ Object.freeze({
23574
23711
  addonId: null,
23575
23712
  access: "view"
23576
23713
  },
23714
+ "recording.listOpsLog": {
23715
+ capName: "recording",
23716
+ capScope: "system",
23717
+ addonId: null,
23718
+ access: "view"
23719
+ },
23577
23720
  "recording.locateSegment": {
23578
23721
  capName: "recording",
23579
23722
  capScope: "system",
package/dist/index.mjs CHANGED
@@ -7340,6 +7340,62 @@ var RecordingConfigSchema = object({
7340
7340
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7341
7341
  });
7342
7342
  /**
7343
+ * Ops-log — the durable, append-only operations audit shared by the
7344
+ * recordings and events management surfaces.
7345
+ *
7346
+ * ONE row shape is reused for both domains so a single "Activity" view can
7347
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7348
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7349
+ * management operation, WHY it ran (reason), and its measurable effect
7350
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7351
+ * never fail the operation it records.
7352
+ */
7353
+ /** Which management domain the operation belongs to. */
7354
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7355
+ /** The kind of management operation performed. */
7356
+ var OpsLogOpSchema = _enum([
7357
+ "prune",
7358
+ "manual-delete",
7359
+ "rescan",
7360
+ "retention-run"
7361
+ ]);
7362
+ /** Why the operation ran. */
7363
+ var OpsLogReasonSchema = _enum([
7364
+ "retention",
7365
+ "quota",
7366
+ "manual",
7367
+ "operator"
7368
+ ]);
7369
+ /** One audit row, shared verbatim by both domains. */
7370
+ var OpsLogEntrySchema = object({
7371
+ /** Unique row id. */
7372
+ id: string(),
7373
+ /** Epoch ms the operation completed. */
7374
+ at: number(),
7375
+ domain: OpsLogDomainSchema,
7376
+ op: OpsLogOpSchema,
7377
+ reason: OpsLogReasonSchema,
7378
+ /** The camera the op targeted; null for a cluster/global op. */
7379
+ deviceId: number().nullable(),
7380
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7381
+ nodeId: string(),
7382
+ /** Buckets / rows deleted (op-specific unit). */
7383
+ itemsAffected: number(),
7384
+ /** Bytes reclaimed by the op (0 when not measurable). */
7385
+ bytesReclaimed: number(),
7386
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7387
+ detail: string().nullable(),
7388
+ /** Who/what triggered the op. */
7389
+ actor: string()
7390
+ });
7391
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7392
+ var OpsLogQueryInputSchema = object({
7393
+ /** Restrict to a single camera; omit for every row. */
7394
+ deviceId: number().optional(),
7395
+ /** Max rows returned, newest-first. */
7396
+ limit: number().int().min(1).max(1e3).optional()
7397
+ });
7398
+ /**
7343
7399
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7344
7400
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7345
7401
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -16270,6 +16326,26 @@ var TrackCascadeCountsSchema = object({
16270
16326
  /** Per-track CLIP search vectors removed (best-effort). */
16271
16327
  embeddings: number().int()
16272
16328
  });
16329
+ /** Event-store footprint for one camera. */
16330
+ var EventStoreDeviceFootprintSchema = object({
16331
+ deviceId: number(),
16332
+ /** Persisted event rows (motion + object + audio) for the camera. */
16333
+ rows: number().int(),
16334
+ /** Event-owned media bytes on disk for the camera. */
16335
+ bytes: number().int()
16336
+ });
16337
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16338
+ var EventStoreFootprintSchema = object({
16339
+ totalRows: number().int(),
16340
+ totalBytes: number().int(),
16341
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16342
+ });
16343
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16344
+ var EventPruneCountsSchema = object({
16345
+ motion: number().int(),
16346
+ object: number().int(),
16347
+ audio: number().int()
16348
+ });
16273
16349
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16274
16350
  deviceId: number(),
16275
16351
  trackId: string()
@@ -16333,6 +16409,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16333
16409
  }), {
16334
16410
  kind: "mutation",
16335
16411
  auth: "admin"
16412
+ }), method(object({}), EventStoreFootprintSchema, {
16413
+ kind: "query",
16414
+ auth: "admin"
16415
+ }), method(object({
16416
+ olderThanMs: number(),
16417
+ reason: OpsLogReasonSchema.optional()
16418
+ }), EventPruneCountsSchema, {
16419
+ kind: "mutation",
16420
+ auth: "admin"
16421
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16422
+ kind: "mutation",
16423
+ auth: "admin"
16424
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16425
+ kind: "query",
16426
+ auth: "admin"
16336
16427
  }), method(object({
16337
16428
  eventId: string(),
16338
16429
  kind: MediaFileKindEnum.optional()
@@ -19566,13 +19657,29 @@ method(object({
19566
19657
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19567
19658
  kind: "mutation",
19568
19659
  auth: "admin"
19569
- }), method(object({ deviceId: number() }), object({
19660
+ }), method(object({
19661
+ deviceId: number(),
19662
+ reason: OpsLogReasonSchema.optional()
19663
+ }), object({
19570
19664
  floorMs: number().nullable(),
19571
19665
  deletedBuckets: number().int(),
19572
19666
  reclaimedBytes: number().int()
19573
19667
  }), {
19574
19668
  kind: "mutation",
19575
19669
  auth: "admin"
19670
+ }), method(object({
19671
+ deviceId: number(),
19672
+ fromMs: number().optional(),
19673
+ toMs: number().optional()
19674
+ }), object({
19675
+ deletedBuckets: number().int(),
19676
+ reclaimedBytes: number().int()
19677
+ }), {
19678
+ kind: "mutation",
19679
+ auth: "admin"
19680
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19681
+ kind: "query",
19682
+ auth: "admin"
19576
19683
  });
19577
19684
  /**
19578
19685
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22694,6 +22801,12 @@ Object.freeze({
22694
22801
  addonId: null,
22695
22802
  access: "delete"
22696
22803
  },
22804
+ "pipelineAnalytics.deleteDeviceEvents": {
22805
+ capName: "pipeline-analytics",
22806
+ capScope: "device",
22807
+ addonId: null,
22808
+ access: "delete"
22809
+ },
22697
22810
  "pipelineAnalytics.deleteTracks": {
22698
22811
  capName: "pipeline-analytics",
22699
22812
  capScope: "device",
@@ -22724,6 +22837,12 @@ Object.freeze({
22724
22837
  addonId: null,
22725
22838
  access: "view"
22726
22839
  },
22840
+ "pipelineAnalytics.getEventStoreFootprint": {
22841
+ capName: "pipeline-analytics",
22842
+ capScope: "device",
22843
+ addonId: null,
22844
+ access: "view"
22845
+ },
22727
22846
  "pipelineAnalytics.getKeyEvents": {
22728
22847
  capName: "pipeline-analytics",
22729
22848
  capScope: "device",
@@ -22766,6 +22885,12 @@ Object.freeze({
22766
22885
  addonId: null,
22767
22886
  access: "view"
22768
22887
  },
22888
+ "pipelineAnalytics.listOpsLog": {
22889
+ capName: "pipeline-analytics",
22890
+ capScope: "device",
22891
+ addonId: null,
22892
+ access: "view"
22893
+ },
22769
22894
  "pipelineAnalytics.listRecentTracks": {
22770
22895
  capName: "pipeline-analytics",
22771
22896
  capScope: "device",
@@ -22778,6 +22903,12 @@ Object.freeze({
22778
22903
  addonId: null,
22779
22904
  access: "view"
22780
22905
  },
22906
+ "pipelineAnalytics.pruneEvents": {
22907
+ capName: "pipeline-analytics",
22908
+ capScope: "device",
22909
+ addonId: null,
22910
+ access: "create"
22911
+ },
22781
22912
  "pipelineAnalytics.pruneEventsBefore": {
22782
22913
  capName: "pipeline-analytics",
22783
22914
  capScope: "device",
@@ -23540,6 +23671,12 @@ Object.freeze({
23540
23671
  addonId: null,
23541
23672
  access: "create"
23542
23673
  },
23674
+ "recording.deleteFootprint": {
23675
+ capName: "recording",
23676
+ capScope: "system",
23677
+ addonId: null,
23678
+ access: "delete"
23679
+ },
23543
23680
  "recording.getAvailability": {
23544
23681
  capName: "recording",
23545
23682
  capScope: "system",
@@ -23570,6 +23707,12 @@ Object.freeze({
23570
23707
  addonId: null,
23571
23708
  access: "view"
23572
23709
  },
23710
+ "recording.listOpsLog": {
23711
+ capName: "recording",
23712
+ capScope: "system",
23713
+ addonId: null,
23714
+ access: "view"
23715
+ },
23573
23716
  "recording.locateSegment": {
23574
23717
  capName: "recording",
23575
23718
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",