@camstack/addon-provider-rtsp 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.
package/dist/addon.js CHANGED
@@ -7370,6 +7370,62 @@ var RecordingConfigSchema = object({
7370
7370
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7371
7371
  });
7372
7372
  /**
7373
+ * Ops-log — the durable, append-only operations audit shared by the
7374
+ * recordings and events management surfaces.
7375
+ *
7376
+ * ONE row shape is reused for both domains so a single "Activity" view can
7377
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7378
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7379
+ * management operation, WHY it ran (reason), and its measurable effect
7380
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7381
+ * never fail the operation it records.
7382
+ */
7383
+ /** Which management domain the operation belongs to. */
7384
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7385
+ /** The kind of management operation performed. */
7386
+ var OpsLogOpSchema = _enum([
7387
+ "prune",
7388
+ "manual-delete",
7389
+ "rescan",
7390
+ "retention-run"
7391
+ ]);
7392
+ /** Why the operation ran. */
7393
+ var OpsLogReasonSchema = _enum([
7394
+ "retention",
7395
+ "quota",
7396
+ "manual",
7397
+ "operator"
7398
+ ]);
7399
+ /** One audit row, shared verbatim by both domains. */
7400
+ var OpsLogEntrySchema = object({
7401
+ /** Unique row id. */
7402
+ id: string(),
7403
+ /** Epoch ms the operation completed. */
7404
+ at: number(),
7405
+ domain: OpsLogDomainSchema,
7406
+ op: OpsLogOpSchema,
7407
+ reason: OpsLogReasonSchema,
7408
+ /** The camera the op targeted; null for a cluster/global op. */
7409
+ deviceId: number().nullable(),
7410
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7411
+ nodeId: string(),
7412
+ /** Buckets / rows deleted (op-specific unit). */
7413
+ itemsAffected: number(),
7414
+ /** Bytes reclaimed by the op (0 when not measurable). */
7415
+ bytesReclaimed: number(),
7416
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7417
+ detail: string().nullable(),
7418
+ /** Who/what triggered the op. */
7419
+ actor: string()
7420
+ });
7421
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7422
+ var OpsLogQueryInputSchema = object({
7423
+ /** Restrict to a single camera; omit for every row. */
7424
+ deviceId: number().optional(),
7425
+ /** Max rows returned, newest-first. */
7426
+ limit: number().int().min(1).max(1e3).optional()
7427
+ });
7428
+ /**
7373
7429
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7374
7430
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7375
7431
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14931,9 +14987,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14931
14987
  * `package` backs the package-drop detector — a package zone is a
14932
14988
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14933
14989
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14934
- * The orchestrator provider that writes this stage lands in a later
14935
- * slice; until then the mirror carries only `{motion, detection}` and
14936
- * consumers read `package` as absent (treat as `[]`).
14990
+ * The orchestrator provider writes this stage as a first-class slice
14991
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14992
+ * package}` shape, so consumers read the current package rules directly
14993
+ * off `device.state.zoneRules.value.package`.
14937
14994
  */
14938
14995
  runtimeState: object({
14939
14996
  motion: array(ZoneRuleSchema).readonly(),
@@ -19250,6 +19307,26 @@ var TrackCascadeCountsSchema = object({
19250
19307
  /** Per-track CLIP search vectors removed (best-effort). */
19251
19308
  embeddings: number().int()
19252
19309
  });
19310
+ /** Event-store footprint for one camera. */
19311
+ var EventStoreDeviceFootprintSchema = object({
19312
+ deviceId: number(),
19313
+ /** Persisted event rows (motion + object + audio) for the camera. */
19314
+ rows: number().int(),
19315
+ /** Event-owned media bytes on disk for the camera. */
19316
+ bytes: number().int()
19317
+ });
19318
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19319
+ var EventStoreFootprintSchema = object({
19320
+ totalRows: number().int(),
19321
+ totalBytes: number().int(),
19322
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19323
+ });
19324
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19325
+ var EventPruneCountsSchema = object({
19326
+ motion: number().int(),
19327
+ object: number().int(),
19328
+ audio: number().int()
19329
+ });
19253
19330
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19254
19331
  deviceId: number(),
19255
19332
  trackId: string()
@@ -19313,6 +19390,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19313
19390
  }), {
19314
19391
  kind: "mutation",
19315
19392
  auth: "admin"
19393
+ }), method(object({}), EventStoreFootprintSchema, {
19394
+ kind: "query",
19395
+ auth: "admin"
19396
+ }), method(object({
19397
+ olderThanMs: number(),
19398
+ reason: OpsLogReasonSchema.optional()
19399
+ }), EventPruneCountsSchema, {
19400
+ kind: "mutation",
19401
+ auth: "admin"
19402
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19403
+ kind: "mutation",
19404
+ auth: "admin"
19405
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19406
+ kind: "query",
19407
+ auth: "admin"
19316
19408
  }), method(object({
19317
19409
  eventId: string(),
19318
19410
  kind: MediaFileKindEnum.optional()
@@ -22597,13 +22689,29 @@ method(object({
22597
22689
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22598
22690
  kind: "mutation",
22599
22691
  auth: "admin"
22600
- }), method(object({ deviceId: number() }), object({
22692
+ }), method(object({
22693
+ deviceId: number(),
22694
+ reason: OpsLogReasonSchema.optional()
22695
+ }), object({
22601
22696
  floorMs: number().nullable(),
22602
22697
  deletedBuckets: number().int(),
22603
22698
  reclaimedBytes: number().int()
22604
22699
  }), {
22605
22700
  kind: "mutation",
22606
22701
  auth: "admin"
22702
+ }), method(object({
22703
+ deviceId: number(),
22704
+ fromMs: number().optional(),
22705
+ toMs: number().optional()
22706
+ }), object({
22707
+ deletedBuckets: number().int(),
22708
+ reclaimedBytes: number().int()
22709
+ }), {
22710
+ kind: "mutation",
22711
+ auth: "admin"
22712
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22713
+ kind: "query",
22714
+ auth: "admin"
22607
22715
  });
22608
22716
  /**
22609
22717
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25738,6 +25846,12 @@ Object.freeze({
25738
25846
  addonId: null,
25739
25847
  access: "delete"
25740
25848
  },
25849
+ "pipelineAnalytics.deleteDeviceEvents": {
25850
+ capName: "pipeline-analytics",
25851
+ capScope: "device",
25852
+ addonId: null,
25853
+ access: "delete"
25854
+ },
25741
25855
  "pipelineAnalytics.deleteTracks": {
25742
25856
  capName: "pipeline-analytics",
25743
25857
  capScope: "device",
@@ -25768,6 +25882,12 @@ Object.freeze({
25768
25882
  addonId: null,
25769
25883
  access: "view"
25770
25884
  },
25885
+ "pipelineAnalytics.getEventStoreFootprint": {
25886
+ capName: "pipeline-analytics",
25887
+ capScope: "device",
25888
+ addonId: null,
25889
+ access: "view"
25890
+ },
25771
25891
  "pipelineAnalytics.getKeyEvents": {
25772
25892
  capName: "pipeline-analytics",
25773
25893
  capScope: "device",
@@ -25810,6 +25930,12 @@ Object.freeze({
25810
25930
  addonId: null,
25811
25931
  access: "view"
25812
25932
  },
25933
+ "pipelineAnalytics.listOpsLog": {
25934
+ capName: "pipeline-analytics",
25935
+ capScope: "device",
25936
+ addonId: null,
25937
+ access: "view"
25938
+ },
25813
25939
  "pipelineAnalytics.listRecentTracks": {
25814
25940
  capName: "pipeline-analytics",
25815
25941
  capScope: "device",
@@ -25822,6 +25948,12 @@ Object.freeze({
25822
25948
  addonId: null,
25823
25949
  access: "view"
25824
25950
  },
25951
+ "pipelineAnalytics.pruneEvents": {
25952
+ capName: "pipeline-analytics",
25953
+ capScope: "device",
25954
+ addonId: null,
25955
+ access: "create"
25956
+ },
25825
25957
  "pipelineAnalytics.pruneEventsBefore": {
25826
25958
  capName: "pipeline-analytics",
25827
25959
  capScope: "device",
@@ -26584,6 +26716,12 @@ Object.freeze({
26584
26716
  addonId: null,
26585
26717
  access: "create"
26586
26718
  },
26719
+ "recording.deleteFootprint": {
26720
+ capName: "recording",
26721
+ capScope: "system",
26722
+ addonId: null,
26723
+ access: "delete"
26724
+ },
26587
26725
  "recording.getAvailability": {
26588
26726
  capName: "recording",
26589
26727
  capScope: "system",
@@ -26614,6 +26752,12 @@ Object.freeze({
26614
26752
  addonId: null,
26615
26753
  access: "view"
26616
26754
  },
26755
+ "recording.listOpsLog": {
26756
+ capName: "recording",
26757
+ capScope: "system",
26758
+ addonId: null,
26759
+ access: "view"
26760
+ },
26617
26761
  "recording.locateSegment": {
26618
26762
  capName: "recording",
26619
26763
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7346,6 +7346,62 @@ var RecordingConfigSchema = object({
7346
7346
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7347
7347
  });
7348
7348
  /**
7349
+ * Ops-log — the durable, append-only operations audit shared by the
7350
+ * recordings and events management surfaces.
7351
+ *
7352
+ * ONE row shape is reused for both domains so a single "Activity" view can
7353
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7354
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7355
+ * management operation, WHY it ran (reason), and its measurable effect
7356
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7357
+ * never fail the operation it records.
7358
+ */
7359
+ /** Which management domain the operation belongs to. */
7360
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7361
+ /** The kind of management operation performed. */
7362
+ var OpsLogOpSchema = _enum([
7363
+ "prune",
7364
+ "manual-delete",
7365
+ "rescan",
7366
+ "retention-run"
7367
+ ]);
7368
+ /** Why the operation ran. */
7369
+ var OpsLogReasonSchema = _enum([
7370
+ "retention",
7371
+ "quota",
7372
+ "manual",
7373
+ "operator"
7374
+ ]);
7375
+ /** One audit row, shared verbatim by both domains. */
7376
+ var OpsLogEntrySchema = object({
7377
+ /** Unique row id. */
7378
+ id: string(),
7379
+ /** Epoch ms the operation completed. */
7380
+ at: number(),
7381
+ domain: OpsLogDomainSchema,
7382
+ op: OpsLogOpSchema,
7383
+ reason: OpsLogReasonSchema,
7384
+ /** The camera the op targeted; null for a cluster/global op. */
7385
+ deviceId: number().nullable(),
7386
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7387
+ nodeId: string(),
7388
+ /** Buckets / rows deleted (op-specific unit). */
7389
+ itemsAffected: number(),
7390
+ /** Bytes reclaimed by the op (0 when not measurable). */
7391
+ bytesReclaimed: number(),
7392
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7393
+ detail: string().nullable(),
7394
+ /** Who/what triggered the op. */
7395
+ actor: string()
7396
+ });
7397
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7398
+ var OpsLogQueryInputSchema = object({
7399
+ /** Restrict to a single camera; omit for every row. */
7400
+ deviceId: number().optional(),
7401
+ /** Max rows returned, newest-first. */
7402
+ limit: number().int().min(1).max(1e3).optional()
7403
+ });
7404
+ /**
7349
7405
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7350
7406
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7351
7407
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14907,9 +14963,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14907
14963
  * `package` backs the package-drop detector — a package zone is a
14908
14964
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14909
14965
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14910
- * The orchestrator provider that writes this stage lands in a later
14911
- * slice; until then the mirror carries only `{motion, detection}` and
14912
- * consumers read `package` as absent (treat as `[]`).
14966
+ * The orchestrator provider writes this stage as a first-class slice
14967
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14968
+ * package}` shape, so consumers read the current package rules directly
14969
+ * off `device.state.zoneRules.value.package`.
14913
14970
  */
14914
14971
  runtimeState: object({
14915
14972
  motion: array(ZoneRuleSchema).readonly(),
@@ -19226,6 +19283,26 @@ var TrackCascadeCountsSchema = object({
19226
19283
  /** Per-track CLIP search vectors removed (best-effort). */
19227
19284
  embeddings: number().int()
19228
19285
  });
19286
+ /** Event-store footprint for one camera. */
19287
+ var EventStoreDeviceFootprintSchema = object({
19288
+ deviceId: number(),
19289
+ /** Persisted event rows (motion + object + audio) for the camera. */
19290
+ rows: number().int(),
19291
+ /** Event-owned media bytes on disk for the camera. */
19292
+ bytes: number().int()
19293
+ });
19294
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19295
+ var EventStoreFootprintSchema = object({
19296
+ totalRows: number().int(),
19297
+ totalBytes: number().int(),
19298
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19299
+ });
19300
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19301
+ var EventPruneCountsSchema = object({
19302
+ motion: number().int(),
19303
+ object: number().int(),
19304
+ audio: number().int()
19305
+ });
19229
19306
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19230
19307
  deviceId: number(),
19231
19308
  trackId: string()
@@ -19289,6 +19366,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19289
19366
  }), {
19290
19367
  kind: "mutation",
19291
19368
  auth: "admin"
19369
+ }), method(object({}), EventStoreFootprintSchema, {
19370
+ kind: "query",
19371
+ auth: "admin"
19372
+ }), method(object({
19373
+ olderThanMs: number(),
19374
+ reason: OpsLogReasonSchema.optional()
19375
+ }), EventPruneCountsSchema, {
19376
+ kind: "mutation",
19377
+ auth: "admin"
19378
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19379
+ kind: "mutation",
19380
+ auth: "admin"
19381
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19382
+ kind: "query",
19383
+ auth: "admin"
19292
19384
  }), method(object({
19293
19385
  eventId: string(),
19294
19386
  kind: MediaFileKindEnum.optional()
@@ -22573,13 +22665,29 @@ method(object({
22573
22665
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22574
22666
  kind: "mutation",
22575
22667
  auth: "admin"
22576
- }), method(object({ deviceId: number() }), object({
22668
+ }), method(object({
22669
+ deviceId: number(),
22670
+ reason: OpsLogReasonSchema.optional()
22671
+ }), object({
22577
22672
  floorMs: number().nullable(),
22578
22673
  deletedBuckets: number().int(),
22579
22674
  reclaimedBytes: number().int()
22580
22675
  }), {
22581
22676
  kind: "mutation",
22582
22677
  auth: "admin"
22678
+ }), method(object({
22679
+ deviceId: number(),
22680
+ fromMs: number().optional(),
22681
+ toMs: number().optional()
22682
+ }), object({
22683
+ deletedBuckets: number().int(),
22684
+ reclaimedBytes: number().int()
22685
+ }), {
22686
+ kind: "mutation",
22687
+ auth: "admin"
22688
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22689
+ kind: "query",
22690
+ auth: "admin"
22583
22691
  });
22584
22692
  /**
22585
22693
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25714,6 +25822,12 @@ Object.freeze({
25714
25822
  addonId: null,
25715
25823
  access: "delete"
25716
25824
  },
25825
+ "pipelineAnalytics.deleteDeviceEvents": {
25826
+ capName: "pipeline-analytics",
25827
+ capScope: "device",
25828
+ addonId: null,
25829
+ access: "delete"
25830
+ },
25717
25831
  "pipelineAnalytics.deleteTracks": {
25718
25832
  capName: "pipeline-analytics",
25719
25833
  capScope: "device",
@@ -25744,6 +25858,12 @@ Object.freeze({
25744
25858
  addonId: null,
25745
25859
  access: "view"
25746
25860
  },
25861
+ "pipelineAnalytics.getEventStoreFootprint": {
25862
+ capName: "pipeline-analytics",
25863
+ capScope: "device",
25864
+ addonId: null,
25865
+ access: "view"
25866
+ },
25747
25867
  "pipelineAnalytics.getKeyEvents": {
25748
25868
  capName: "pipeline-analytics",
25749
25869
  capScope: "device",
@@ -25786,6 +25906,12 @@ Object.freeze({
25786
25906
  addonId: null,
25787
25907
  access: "view"
25788
25908
  },
25909
+ "pipelineAnalytics.listOpsLog": {
25910
+ capName: "pipeline-analytics",
25911
+ capScope: "device",
25912
+ addonId: null,
25913
+ access: "view"
25914
+ },
25789
25915
  "pipelineAnalytics.listRecentTracks": {
25790
25916
  capName: "pipeline-analytics",
25791
25917
  capScope: "device",
@@ -25798,6 +25924,12 @@ Object.freeze({
25798
25924
  addonId: null,
25799
25925
  access: "view"
25800
25926
  },
25927
+ "pipelineAnalytics.pruneEvents": {
25928
+ capName: "pipeline-analytics",
25929
+ capScope: "device",
25930
+ addonId: null,
25931
+ access: "create"
25932
+ },
25801
25933
  "pipelineAnalytics.pruneEventsBefore": {
25802
25934
  capName: "pipeline-analytics",
25803
25935
  capScope: "device",
@@ -26560,6 +26692,12 @@ Object.freeze({
26560
26692
  addonId: null,
26561
26693
  access: "create"
26562
26694
  },
26695
+ "recording.deleteFootprint": {
26696
+ capName: "recording",
26697
+ capScope: "system",
26698
+ addonId: null,
26699
+ access: "delete"
26700
+ },
26563
26701
  "recording.getAvailability": {
26564
26702
  capName: "recording",
26565
26703
  capScope: "system",
@@ -26590,6 +26728,12 @@ Object.freeze({
26590
26728
  addonId: null,
26591
26729
  access: "view"
26592
26730
  },
26731
+ "recording.listOpsLog": {
26732
+ capName: "recording",
26733
+ capScope: "system",
26734
+ addonId: null,
26735
+ access: "view"
26736
+ },
26593
26737
  "recording.locateSegment": {
26594
26738
  capName: "recording",
26595
26739
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",