@camstack/addon-provider-wyze 0.1.23 → 0.1.24

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
@@ -7375,6 +7375,62 @@ var RecordingConfigSchema = object({
7375
7375
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7376
7376
  });
7377
7377
  /**
7378
+ * Ops-log — the durable, append-only operations audit shared by the
7379
+ * recordings and events management surfaces.
7380
+ *
7381
+ * ONE row shape is reused for both domains so a single "Activity" view can
7382
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7383
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7384
+ * management operation, WHY it ran (reason), and its measurable effect
7385
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7386
+ * never fail the operation it records.
7387
+ */
7388
+ /** Which management domain the operation belongs to. */
7389
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7390
+ /** The kind of management operation performed. */
7391
+ var OpsLogOpSchema = _enum([
7392
+ "prune",
7393
+ "manual-delete",
7394
+ "rescan",
7395
+ "retention-run"
7396
+ ]);
7397
+ /** Why the operation ran. */
7398
+ var OpsLogReasonSchema = _enum([
7399
+ "retention",
7400
+ "quota",
7401
+ "manual",
7402
+ "operator"
7403
+ ]);
7404
+ /** One audit row, shared verbatim by both domains. */
7405
+ var OpsLogEntrySchema = object({
7406
+ /** Unique row id. */
7407
+ id: string(),
7408
+ /** Epoch ms the operation completed. */
7409
+ at: number(),
7410
+ domain: OpsLogDomainSchema,
7411
+ op: OpsLogOpSchema,
7412
+ reason: OpsLogReasonSchema,
7413
+ /** The camera the op targeted; null for a cluster/global op. */
7414
+ deviceId: number().nullable(),
7415
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7416
+ nodeId: string(),
7417
+ /** Buckets / rows deleted (op-specific unit). */
7418
+ itemsAffected: number(),
7419
+ /** Bytes reclaimed by the op (0 when not measurable). */
7420
+ bytesReclaimed: number(),
7421
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7422
+ detail: string().nullable(),
7423
+ /** Who/what triggered the op. */
7424
+ actor: string()
7425
+ });
7426
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7427
+ var OpsLogQueryInputSchema = object({
7428
+ /** Restrict to a single camera; omit for every row. */
7429
+ deviceId: number().optional(),
7430
+ /** Max rows returned, newest-first. */
7431
+ limit: number().int().min(1).max(1e3).optional()
7432
+ });
7433
+ /**
7378
7434
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7379
7435
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7380
7436
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14838,9 +14894,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14838
14894
  * `package` backs the package-drop detector — a package zone is a
14839
14895
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14840
14896
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14841
- * The orchestrator provider that writes this stage lands in a later
14842
- * slice; until then the mirror carries only `{motion, detection}` and
14843
- * consumers read `package` as absent (treat as `[]`).
14897
+ * The orchestrator provider writes this stage as a first-class slice
14898
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14899
+ * package}` shape, so consumers read the current package rules directly
14900
+ * off `device.state.zoneRules.value.package`.
14844
14901
  */
14845
14902
  runtimeState: object({
14846
14903
  motion: array(ZoneRuleSchema).readonly(),
@@ -19174,6 +19231,26 @@ var TrackCascadeCountsSchema = object({
19174
19231
  /** Per-track CLIP search vectors removed (best-effort). */
19175
19232
  embeddings: number().int()
19176
19233
  });
19234
+ /** Event-store footprint for one camera. */
19235
+ var EventStoreDeviceFootprintSchema = object({
19236
+ deviceId: number(),
19237
+ /** Persisted event rows (motion + object + audio) for the camera. */
19238
+ rows: number().int(),
19239
+ /** Event-owned media bytes on disk for the camera. */
19240
+ bytes: number().int()
19241
+ });
19242
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19243
+ var EventStoreFootprintSchema = object({
19244
+ totalRows: number().int(),
19245
+ totalBytes: number().int(),
19246
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19247
+ });
19248
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19249
+ var EventPruneCountsSchema = object({
19250
+ motion: number().int(),
19251
+ object: number().int(),
19252
+ audio: number().int()
19253
+ });
19177
19254
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19178
19255
  deviceId: number(),
19179
19256
  trackId: string()
@@ -19237,6 +19314,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19237
19314
  }), {
19238
19315
  kind: "mutation",
19239
19316
  auth: "admin"
19317
+ }), method(object({}), EventStoreFootprintSchema, {
19318
+ kind: "query",
19319
+ auth: "admin"
19320
+ }), method(object({
19321
+ olderThanMs: number(),
19322
+ reason: OpsLogReasonSchema.optional()
19323
+ }), EventPruneCountsSchema, {
19324
+ kind: "mutation",
19325
+ auth: "admin"
19326
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19327
+ kind: "mutation",
19328
+ auth: "admin"
19329
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19330
+ kind: "query",
19331
+ auth: "admin"
19240
19332
  }), method(object({
19241
19333
  eventId: string(),
19242
19334
  kind: MediaFileKindEnum.optional()
@@ -22572,13 +22664,29 @@ method(object({
22572
22664
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22573
22665
  kind: "mutation",
22574
22666
  auth: "admin"
22575
- }), method(object({ deviceId: number() }), object({
22667
+ }), method(object({
22668
+ deviceId: number(),
22669
+ reason: OpsLogReasonSchema.optional()
22670
+ }), object({
22576
22671
  floorMs: number().nullable(),
22577
22672
  deletedBuckets: number().int(),
22578
22673
  reclaimedBytes: number().int()
22579
22674
  }), {
22580
22675
  kind: "mutation",
22581
22676
  auth: "admin"
22677
+ }), method(object({
22678
+ deviceId: number(),
22679
+ fromMs: number().optional(),
22680
+ toMs: number().optional()
22681
+ }), object({
22682
+ deletedBuckets: number().int(),
22683
+ reclaimedBytes: number().int()
22684
+ }), {
22685
+ kind: "mutation",
22686
+ auth: "admin"
22687
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22688
+ kind: "query",
22689
+ auth: "admin"
22582
22690
  });
22583
22691
  /**
22584
22692
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25713,6 +25821,12 @@ Object.freeze({
25713
25821
  addonId: null,
25714
25822
  access: "delete"
25715
25823
  },
25824
+ "pipelineAnalytics.deleteDeviceEvents": {
25825
+ capName: "pipeline-analytics",
25826
+ capScope: "device",
25827
+ addonId: null,
25828
+ access: "delete"
25829
+ },
25716
25830
  "pipelineAnalytics.deleteTracks": {
25717
25831
  capName: "pipeline-analytics",
25718
25832
  capScope: "device",
@@ -25743,6 +25857,12 @@ Object.freeze({
25743
25857
  addonId: null,
25744
25858
  access: "view"
25745
25859
  },
25860
+ "pipelineAnalytics.getEventStoreFootprint": {
25861
+ capName: "pipeline-analytics",
25862
+ capScope: "device",
25863
+ addonId: null,
25864
+ access: "view"
25865
+ },
25746
25866
  "pipelineAnalytics.getKeyEvents": {
25747
25867
  capName: "pipeline-analytics",
25748
25868
  capScope: "device",
@@ -25785,6 +25905,12 @@ Object.freeze({
25785
25905
  addonId: null,
25786
25906
  access: "view"
25787
25907
  },
25908
+ "pipelineAnalytics.listOpsLog": {
25909
+ capName: "pipeline-analytics",
25910
+ capScope: "device",
25911
+ addonId: null,
25912
+ access: "view"
25913
+ },
25788
25914
  "pipelineAnalytics.listRecentTracks": {
25789
25915
  capName: "pipeline-analytics",
25790
25916
  capScope: "device",
@@ -25797,6 +25923,12 @@ Object.freeze({
25797
25923
  addonId: null,
25798
25924
  access: "view"
25799
25925
  },
25926
+ "pipelineAnalytics.pruneEvents": {
25927
+ capName: "pipeline-analytics",
25928
+ capScope: "device",
25929
+ addonId: null,
25930
+ access: "create"
25931
+ },
25800
25932
  "pipelineAnalytics.pruneEventsBefore": {
25801
25933
  capName: "pipeline-analytics",
25802
25934
  capScope: "device",
@@ -26559,6 +26691,12 @@ Object.freeze({
26559
26691
  addonId: null,
26560
26692
  access: "create"
26561
26693
  },
26694
+ "recording.deleteFootprint": {
26695
+ capName: "recording",
26696
+ capScope: "system",
26697
+ addonId: null,
26698
+ access: "delete"
26699
+ },
26562
26700
  "recording.getAvailability": {
26563
26701
  capName: "recording",
26564
26702
  capScope: "system",
@@ -26589,6 +26727,12 @@ Object.freeze({
26589
26727
  addonId: null,
26590
26728
  access: "view"
26591
26729
  },
26730
+ "recording.listOpsLog": {
26731
+ capName: "recording",
26732
+ capScope: "system",
26733
+ addonId: null,
26734
+ access: "view"
26735
+ },
26592
26736
  "recording.locateSegment": {
26593
26737
  capName: "recording",
26594
26738
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7354,6 +7354,62 @@ var RecordingConfigSchema = object({
7354
7354
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7355
7355
  });
7356
7356
  /**
7357
+ * Ops-log — the durable, append-only operations audit shared by the
7358
+ * recordings and events management surfaces.
7359
+ *
7360
+ * ONE row shape is reused for both domains so a single "Activity" view can
7361
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7362
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7363
+ * management operation, WHY it ran (reason), and its measurable effect
7364
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7365
+ * never fail the operation it records.
7366
+ */
7367
+ /** Which management domain the operation belongs to. */
7368
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7369
+ /** The kind of management operation performed. */
7370
+ var OpsLogOpSchema = _enum([
7371
+ "prune",
7372
+ "manual-delete",
7373
+ "rescan",
7374
+ "retention-run"
7375
+ ]);
7376
+ /** Why the operation ran. */
7377
+ var OpsLogReasonSchema = _enum([
7378
+ "retention",
7379
+ "quota",
7380
+ "manual",
7381
+ "operator"
7382
+ ]);
7383
+ /** One audit row, shared verbatim by both domains. */
7384
+ var OpsLogEntrySchema = object({
7385
+ /** Unique row id. */
7386
+ id: string(),
7387
+ /** Epoch ms the operation completed. */
7388
+ at: number(),
7389
+ domain: OpsLogDomainSchema,
7390
+ op: OpsLogOpSchema,
7391
+ reason: OpsLogReasonSchema,
7392
+ /** The camera the op targeted; null for a cluster/global op. */
7393
+ deviceId: number().nullable(),
7394
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7395
+ nodeId: string(),
7396
+ /** Buckets / rows deleted (op-specific unit). */
7397
+ itemsAffected: number(),
7398
+ /** Bytes reclaimed by the op (0 when not measurable). */
7399
+ bytesReclaimed: number(),
7400
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7401
+ detail: string().nullable(),
7402
+ /** Who/what triggered the op. */
7403
+ actor: string()
7404
+ });
7405
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7406
+ var OpsLogQueryInputSchema = object({
7407
+ /** Restrict to a single camera; omit for every row. */
7408
+ deviceId: number().optional(),
7409
+ /** Max rows returned, newest-first. */
7410
+ limit: number().int().min(1).max(1e3).optional()
7411
+ });
7412
+ /**
7357
7413
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7358
7414
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7359
7415
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14817,9 +14873,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14817
14873
  * `package` backs the package-drop detector — a package zone is a
14818
14874
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14819
14875
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14820
- * The orchestrator provider that writes this stage lands in a later
14821
- * slice; until then the mirror carries only `{motion, detection}` and
14822
- * consumers read `package` as absent (treat as `[]`).
14876
+ * The orchestrator provider writes this stage as a first-class slice
14877
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14878
+ * package}` shape, so consumers read the current package rules directly
14879
+ * off `device.state.zoneRules.value.package`.
14823
14880
  */
14824
14881
  runtimeState: object({
14825
14882
  motion: array(ZoneRuleSchema).readonly(),
@@ -19153,6 +19210,26 @@ var TrackCascadeCountsSchema = object({
19153
19210
  /** Per-track CLIP search vectors removed (best-effort). */
19154
19211
  embeddings: number().int()
19155
19212
  });
19213
+ /** Event-store footprint for one camera. */
19214
+ var EventStoreDeviceFootprintSchema = object({
19215
+ deviceId: number(),
19216
+ /** Persisted event rows (motion + object + audio) for the camera. */
19217
+ rows: number().int(),
19218
+ /** Event-owned media bytes on disk for the camera. */
19219
+ bytes: number().int()
19220
+ });
19221
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19222
+ var EventStoreFootprintSchema = object({
19223
+ totalRows: number().int(),
19224
+ totalBytes: number().int(),
19225
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19226
+ });
19227
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19228
+ var EventPruneCountsSchema = object({
19229
+ motion: number().int(),
19230
+ object: number().int(),
19231
+ audio: number().int()
19232
+ });
19156
19233
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19157
19234
  deviceId: number(),
19158
19235
  trackId: string()
@@ -19216,6 +19293,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19216
19293
  }), {
19217
19294
  kind: "mutation",
19218
19295
  auth: "admin"
19296
+ }), method(object({}), EventStoreFootprintSchema, {
19297
+ kind: "query",
19298
+ auth: "admin"
19299
+ }), method(object({
19300
+ olderThanMs: number(),
19301
+ reason: OpsLogReasonSchema.optional()
19302
+ }), EventPruneCountsSchema, {
19303
+ kind: "mutation",
19304
+ auth: "admin"
19305
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19306
+ kind: "mutation",
19307
+ auth: "admin"
19308
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19309
+ kind: "query",
19310
+ auth: "admin"
19219
19311
  }), method(object({
19220
19312
  eventId: string(),
19221
19313
  kind: MediaFileKindEnum.optional()
@@ -22551,13 +22643,29 @@ method(object({
22551
22643
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22552
22644
  kind: "mutation",
22553
22645
  auth: "admin"
22554
- }), method(object({ deviceId: number() }), object({
22646
+ }), method(object({
22647
+ deviceId: number(),
22648
+ reason: OpsLogReasonSchema.optional()
22649
+ }), object({
22555
22650
  floorMs: number().nullable(),
22556
22651
  deletedBuckets: number().int(),
22557
22652
  reclaimedBytes: number().int()
22558
22653
  }), {
22559
22654
  kind: "mutation",
22560
22655
  auth: "admin"
22656
+ }), method(object({
22657
+ deviceId: number(),
22658
+ fromMs: number().optional(),
22659
+ toMs: number().optional()
22660
+ }), object({
22661
+ deletedBuckets: number().int(),
22662
+ reclaimedBytes: number().int()
22663
+ }), {
22664
+ kind: "mutation",
22665
+ auth: "admin"
22666
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22667
+ kind: "query",
22668
+ auth: "admin"
22561
22669
  });
22562
22670
  /**
22563
22671
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25692,6 +25800,12 @@ Object.freeze({
25692
25800
  addonId: null,
25693
25801
  access: "delete"
25694
25802
  },
25803
+ "pipelineAnalytics.deleteDeviceEvents": {
25804
+ capName: "pipeline-analytics",
25805
+ capScope: "device",
25806
+ addonId: null,
25807
+ access: "delete"
25808
+ },
25695
25809
  "pipelineAnalytics.deleteTracks": {
25696
25810
  capName: "pipeline-analytics",
25697
25811
  capScope: "device",
@@ -25722,6 +25836,12 @@ Object.freeze({
25722
25836
  addonId: null,
25723
25837
  access: "view"
25724
25838
  },
25839
+ "pipelineAnalytics.getEventStoreFootprint": {
25840
+ capName: "pipeline-analytics",
25841
+ capScope: "device",
25842
+ addonId: null,
25843
+ access: "view"
25844
+ },
25725
25845
  "pipelineAnalytics.getKeyEvents": {
25726
25846
  capName: "pipeline-analytics",
25727
25847
  capScope: "device",
@@ -25764,6 +25884,12 @@ Object.freeze({
25764
25884
  addonId: null,
25765
25885
  access: "view"
25766
25886
  },
25887
+ "pipelineAnalytics.listOpsLog": {
25888
+ capName: "pipeline-analytics",
25889
+ capScope: "device",
25890
+ addonId: null,
25891
+ access: "view"
25892
+ },
25767
25893
  "pipelineAnalytics.listRecentTracks": {
25768
25894
  capName: "pipeline-analytics",
25769
25895
  capScope: "device",
@@ -25776,6 +25902,12 @@ Object.freeze({
25776
25902
  addonId: null,
25777
25903
  access: "view"
25778
25904
  },
25905
+ "pipelineAnalytics.pruneEvents": {
25906
+ capName: "pipeline-analytics",
25907
+ capScope: "device",
25908
+ addonId: null,
25909
+ access: "create"
25910
+ },
25779
25911
  "pipelineAnalytics.pruneEventsBefore": {
25780
25912
  capName: "pipeline-analytics",
25781
25913
  capScope: "device",
@@ -26538,6 +26670,12 @@ Object.freeze({
26538
26670
  addonId: null,
26539
26671
  access: "create"
26540
26672
  },
26673
+ "recording.deleteFootprint": {
26674
+ capName: "recording",
26675
+ capScope: "system",
26676
+ addonId: null,
26677
+ access: "delete"
26678
+ },
26541
26679
  "recording.getAvailability": {
26542
26680
  capName: "recording",
26543
26681
  capScope: "system",
@@ -26568,6 +26706,12 @@ Object.freeze({
26568
26706
  addonId: null,
26569
26707
  access: "view"
26570
26708
  },
26709
+ "recording.listOpsLog": {
26710
+ capName: "recording",
26711
+ capScope: "system",
26712
+ addonId: null,
26713
+ access: "view"
26714
+ },
26571
26715
  "recording.locateSegment": {
26572
26716
  capName: "recording",
26573
26717
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",