@camstack/addon-provider-dreame 0.1.32 → 0.1.33

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
@@ -7396,6 +7396,62 @@ var RecordingConfigSchema = object({
7396
7396
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7397
7397
  });
7398
7398
  /**
7399
+ * Ops-log — the durable, append-only operations audit shared by the
7400
+ * recordings and events management surfaces.
7401
+ *
7402
+ * ONE row shape is reused for both domains so a single "Activity" view can
7403
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7404
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7405
+ * management operation, WHY it ran (reason), and its measurable effect
7406
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7407
+ * never fail the operation it records.
7408
+ */
7409
+ /** Which management domain the operation belongs to. */
7410
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7411
+ /** The kind of management operation performed. */
7412
+ var OpsLogOpSchema = _enum([
7413
+ "prune",
7414
+ "manual-delete",
7415
+ "rescan",
7416
+ "retention-run"
7417
+ ]);
7418
+ /** Why the operation ran. */
7419
+ var OpsLogReasonSchema = _enum([
7420
+ "retention",
7421
+ "quota",
7422
+ "manual",
7423
+ "operator"
7424
+ ]);
7425
+ /** One audit row, shared verbatim by both domains. */
7426
+ var OpsLogEntrySchema = object({
7427
+ /** Unique row id. */
7428
+ id: string(),
7429
+ /** Epoch ms the operation completed. */
7430
+ at: number(),
7431
+ domain: OpsLogDomainSchema,
7432
+ op: OpsLogOpSchema,
7433
+ reason: OpsLogReasonSchema,
7434
+ /** The camera the op targeted; null for a cluster/global op. */
7435
+ deviceId: number().nullable(),
7436
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7437
+ nodeId: string(),
7438
+ /** Buckets / rows deleted (op-specific unit). */
7439
+ itemsAffected: number(),
7440
+ /** Bytes reclaimed by the op (0 when not measurable). */
7441
+ bytesReclaimed: number(),
7442
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7443
+ detail: string().nullable(),
7444
+ /** Who/what triggered the op. */
7445
+ actor: string()
7446
+ });
7447
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7448
+ var OpsLogQueryInputSchema = object({
7449
+ /** Restrict to a single camera; omit for every row. */
7450
+ deviceId: number().optional(),
7451
+ /** Max rows returned, newest-first. */
7452
+ limit: number().int().min(1).max(1e3).optional()
7453
+ });
7454
+ /**
7399
7455
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7400
7456
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7401
7457
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14859,9 +14915,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14859
14915
  * `package` backs the package-drop detector — a package zone is a
14860
14916
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14861
14917
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14862
- * The orchestrator provider that writes this stage lands in a later
14863
- * slice; until then the mirror carries only `{motion, detection}` and
14864
- * consumers read `package` as absent (treat as `[]`).
14918
+ * The orchestrator provider writes this stage as a first-class slice
14919
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14920
+ * package}` shape, so consumers read the current package rules directly
14921
+ * off `device.state.zoneRules.value.package`.
14865
14922
  */
14866
14923
  runtimeState: object({
14867
14924
  motion: array(ZoneRuleSchema).readonly(),
@@ -19195,6 +19252,26 @@ var TrackCascadeCountsSchema = object({
19195
19252
  /** Per-track CLIP search vectors removed (best-effort). */
19196
19253
  embeddings: number().int()
19197
19254
  });
19255
+ /** Event-store footprint for one camera. */
19256
+ var EventStoreDeviceFootprintSchema = object({
19257
+ deviceId: number(),
19258
+ /** Persisted event rows (motion + object + audio) for the camera. */
19259
+ rows: number().int(),
19260
+ /** Event-owned media bytes on disk for the camera. */
19261
+ bytes: number().int()
19262
+ });
19263
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19264
+ var EventStoreFootprintSchema = object({
19265
+ totalRows: number().int(),
19266
+ totalBytes: number().int(),
19267
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19268
+ });
19269
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19270
+ var EventPruneCountsSchema = object({
19271
+ motion: number().int(),
19272
+ object: number().int(),
19273
+ audio: number().int()
19274
+ });
19198
19275
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19199
19276
  deviceId: number(),
19200
19277
  trackId: string()
@@ -19258,6 +19335,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19258
19335
  }), {
19259
19336
  kind: "mutation",
19260
19337
  auth: "admin"
19338
+ }), method(object({}), EventStoreFootprintSchema, {
19339
+ kind: "query",
19340
+ auth: "admin"
19341
+ }), method(object({
19342
+ olderThanMs: number(),
19343
+ reason: OpsLogReasonSchema.optional()
19344
+ }), EventPruneCountsSchema, {
19345
+ kind: "mutation",
19346
+ auth: "admin"
19347
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19348
+ kind: "mutation",
19349
+ auth: "admin"
19350
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19351
+ kind: "query",
19352
+ auth: "admin"
19261
19353
  }), method(object({
19262
19354
  eventId: string(),
19263
19355
  kind: MediaFileKindEnum.optional()
@@ -22508,13 +22600,29 @@ method(object({
22508
22600
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22509
22601
  kind: "mutation",
22510
22602
  auth: "admin"
22511
- }), method(object({ deviceId: number() }), object({
22603
+ }), method(object({
22604
+ deviceId: number(),
22605
+ reason: OpsLogReasonSchema.optional()
22606
+ }), object({
22512
22607
  floorMs: number().nullable(),
22513
22608
  deletedBuckets: number().int(),
22514
22609
  reclaimedBytes: number().int()
22515
22610
  }), {
22516
22611
  kind: "mutation",
22517
22612
  auth: "admin"
22613
+ }), method(object({
22614
+ deviceId: number(),
22615
+ fromMs: number().optional(),
22616
+ toMs: number().optional()
22617
+ }), object({
22618
+ deletedBuckets: number().int(),
22619
+ reclaimedBytes: number().int()
22620
+ }), {
22621
+ kind: "mutation",
22622
+ auth: "admin"
22623
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22624
+ kind: "query",
22625
+ auth: "admin"
22518
22626
  });
22519
22627
  /**
22520
22628
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25636,6 +25744,12 @@ Object.freeze({
25636
25744
  addonId: null,
25637
25745
  access: "delete"
25638
25746
  },
25747
+ "pipelineAnalytics.deleteDeviceEvents": {
25748
+ capName: "pipeline-analytics",
25749
+ capScope: "device",
25750
+ addonId: null,
25751
+ access: "delete"
25752
+ },
25639
25753
  "pipelineAnalytics.deleteTracks": {
25640
25754
  capName: "pipeline-analytics",
25641
25755
  capScope: "device",
@@ -25666,6 +25780,12 @@ Object.freeze({
25666
25780
  addonId: null,
25667
25781
  access: "view"
25668
25782
  },
25783
+ "pipelineAnalytics.getEventStoreFootprint": {
25784
+ capName: "pipeline-analytics",
25785
+ capScope: "device",
25786
+ addonId: null,
25787
+ access: "view"
25788
+ },
25669
25789
  "pipelineAnalytics.getKeyEvents": {
25670
25790
  capName: "pipeline-analytics",
25671
25791
  capScope: "device",
@@ -25708,6 +25828,12 @@ Object.freeze({
25708
25828
  addonId: null,
25709
25829
  access: "view"
25710
25830
  },
25831
+ "pipelineAnalytics.listOpsLog": {
25832
+ capName: "pipeline-analytics",
25833
+ capScope: "device",
25834
+ addonId: null,
25835
+ access: "view"
25836
+ },
25711
25837
  "pipelineAnalytics.listRecentTracks": {
25712
25838
  capName: "pipeline-analytics",
25713
25839
  capScope: "device",
@@ -25720,6 +25846,12 @@ Object.freeze({
25720
25846
  addonId: null,
25721
25847
  access: "view"
25722
25848
  },
25849
+ "pipelineAnalytics.pruneEvents": {
25850
+ capName: "pipeline-analytics",
25851
+ capScope: "device",
25852
+ addonId: null,
25853
+ access: "create"
25854
+ },
25723
25855
  "pipelineAnalytics.pruneEventsBefore": {
25724
25856
  capName: "pipeline-analytics",
25725
25857
  capScope: "device",
@@ -26482,6 +26614,12 @@ Object.freeze({
26482
26614
  addonId: null,
26483
26615
  access: "create"
26484
26616
  },
26617
+ "recording.deleteFootprint": {
26618
+ capName: "recording",
26619
+ capScope: "system",
26620
+ addonId: null,
26621
+ access: "delete"
26622
+ },
26485
26623
  "recording.getAvailability": {
26486
26624
  capName: "recording",
26487
26625
  capScope: "system",
@@ -26512,6 +26650,12 @@ Object.freeze({
26512
26650
  addonId: null,
26513
26651
  access: "view"
26514
26652
  },
26653
+ "recording.listOpsLog": {
26654
+ capName: "recording",
26655
+ capScope: "system",
26656
+ addonId: null,
26657
+ access: "view"
26658
+ },
26515
26659
  "recording.locateSegment": {
26516
26660
  capName: "recording",
26517
26661
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7396,6 +7396,62 @@ var RecordingConfigSchema = object({
7396
7396
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7397
7397
  });
7398
7398
  /**
7399
+ * Ops-log — the durable, append-only operations audit shared by the
7400
+ * recordings and events management surfaces.
7401
+ *
7402
+ * ONE row shape is reused for both domains so a single "Activity" view can
7403
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7404
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7405
+ * management operation, WHY it ran (reason), and its measurable effect
7406
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7407
+ * never fail the operation it records.
7408
+ */
7409
+ /** Which management domain the operation belongs to. */
7410
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7411
+ /** The kind of management operation performed. */
7412
+ var OpsLogOpSchema = _enum([
7413
+ "prune",
7414
+ "manual-delete",
7415
+ "rescan",
7416
+ "retention-run"
7417
+ ]);
7418
+ /** Why the operation ran. */
7419
+ var OpsLogReasonSchema = _enum([
7420
+ "retention",
7421
+ "quota",
7422
+ "manual",
7423
+ "operator"
7424
+ ]);
7425
+ /** One audit row, shared verbatim by both domains. */
7426
+ var OpsLogEntrySchema = object({
7427
+ /** Unique row id. */
7428
+ id: string(),
7429
+ /** Epoch ms the operation completed. */
7430
+ at: number(),
7431
+ domain: OpsLogDomainSchema,
7432
+ op: OpsLogOpSchema,
7433
+ reason: OpsLogReasonSchema,
7434
+ /** The camera the op targeted; null for a cluster/global op. */
7435
+ deviceId: number().nullable(),
7436
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7437
+ nodeId: string(),
7438
+ /** Buckets / rows deleted (op-specific unit). */
7439
+ itemsAffected: number(),
7440
+ /** Bytes reclaimed by the op (0 when not measurable). */
7441
+ bytesReclaimed: number(),
7442
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7443
+ detail: string().nullable(),
7444
+ /** Who/what triggered the op. */
7445
+ actor: string()
7446
+ });
7447
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7448
+ var OpsLogQueryInputSchema = object({
7449
+ /** Restrict to a single camera; omit for every row. */
7450
+ deviceId: number().optional(),
7451
+ /** Max rows returned, newest-first. */
7452
+ limit: number().int().min(1).max(1e3).optional()
7453
+ });
7454
+ /**
7399
7455
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7400
7456
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7401
7457
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14859,9 +14915,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14859
14915
  * `package` backs the package-drop detector — a package zone is a
14860
14916
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14861
14917
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14862
- * The orchestrator provider that writes this stage lands in a later
14863
- * slice; until then the mirror carries only `{motion, detection}` and
14864
- * consumers read `package` as absent (treat as `[]`).
14918
+ * The orchestrator provider writes this stage as a first-class slice
14919
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
14920
+ * package}` shape, so consumers read the current package rules directly
14921
+ * off `device.state.zoneRules.value.package`.
14865
14922
  */
14866
14923
  runtimeState: object({
14867
14924
  motion: array(ZoneRuleSchema).readonly(),
@@ -19195,6 +19252,26 @@ var TrackCascadeCountsSchema = object({
19195
19252
  /** Per-track CLIP search vectors removed (best-effort). */
19196
19253
  embeddings: number().int()
19197
19254
  });
19255
+ /** Event-store footprint for one camera. */
19256
+ var EventStoreDeviceFootprintSchema = object({
19257
+ deviceId: number(),
19258
+ /** Persisted event rows (motion + object + audio) for the camera. */
19259
+ rows: number().int(),
19260
+ /** Event-owned media bytes on disk for the camera. */
19261
+ bytes: number().int()
19262
+ });
19263
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19264
+ var EventStoreFootprintSchema = object({
19265
+ totalRows: number().int(),
19266
+ totalBytes: number().int(),
19267
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19268
+ });
19269
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19270
+ var EventPruneCountsSchema = object({
19271
+ motion: number().int(),
19272
+ object: number().int(),
19273
+ audio: number().int()
19274
+ });
19198
19275
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19199
19276
  deviceId: number(),
19200
19277
  trackId: string()
@@ -19258,6 +19335,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19258
19335
  }), {
19259
19336
  kind: "mutation",
19260
19337
  auth: "admin"
19338
+ }), method(object({}), EventStoreFootprintSchema, {
19339
+ kind: "query",
19340
+ auth: "admin"
19341
+ }), method(object({
19342
+ olderThanMs: number(),
19343
+ reason: OpsLogReasonSchema.optional()
19344
+ }), EventPruneCountsSchema, {
19345
+ kind: "mutation",
19346
+ auth: "admin"
19347
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19348
+ kind: "mutation",
19349
+ auth: "admin"
19350
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19351
+ kind: "query",
19352
+ auth: "admin"
19261
19353
  }), method(object({
19262
19354
  eventId: string(),
19263
19355
  kind: MediaFileKindEnum.optional()
@@ -22508,13 +22600,29 @@ method(object({
22508
22600
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22509
22601
  kind: "mutation",
22510
22602
  auth: "admin"
22511
- }), method(object({ deviceId: number() }), object({
22603
+ }), method(object({
22604
+ deviceId: number(),
22605
+ reason: OpsLogReasonSchema.optional()
22606
+ }), object({
22512
22607
  floorMs: number().nullable(),
22513
22608
  deletedBuckets: number().int(),
22514
22609
  reclaimedBytes: number().int()
22515
22610
  }), {
22516
22611
  kind: "mutation",
22517
22612
  auth: "admin"
22613
+ }), method(object({
22614
+ deviceId: number(),
22615
+ fromMs: number().optional(),
22616
+ toMs: number().optional()
22617
+ }), object({
22618
+ deletedBuckets: number().int(),
22619
+ reclaimedBytes: number().int()
22620
+ }), {
22621
+ kind: "mutation",
22622
+ auth: "admin"
22623
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22624
+ kind: "query",
22625
+ auth: "admin"
22518
22626
  });
22519
22627
  /**
22520
22628
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25636,6 +25744,12 @@ Object.freeze({
25636
25744
  addonId: null,
25637
25745
  access: "delete"
25638
25746
  },
25747
+ "pipelineAnalytics.deleteDeviceEvents": {
25748
+ capName: "pipeline-analytics",
25749
+ capScope: "device",
25750
+ addonId: null,
25751
+ access: "delete"
25752
+ },
25639
25753
  "pipelineAnalytics.deleteTracks": {
25640
25754
  capName: "pipeline-analytics",
25641
25755
  capScope: "device",
@@ -25666,6 +25780,12 @@ Object.freeze({
25666
25780
  addonId: null,
25667
25781
  access: "view"
25668
25782
  },
25783
+ "pipelineAnalytics.getEventStoreFootprint": {
25784
+ capName: "pipeline-analytics",
25785
+ capScope: "device",
25786
+ addonId: null,
25787
+ access: "view"
25788
+ },
25669
25789
  "pipelineAnalytics.getKeyEvents": {
25670
25790
  capName: "pipeline-analytics",
25671
25791
  capScope: "device",
@@ -25708,6 +25828,12 @@ Object.freeze({
25708
25828
  addonId: null,
25709
25829
  access: "view"
25710
25830
  },
25831
+ "pipelineAnalytics.listOpsLog": {
25832
+ capName: "pipeline-analytics",
25833
+ capScope: "device",
25834
+ addonId: null,
25835
+ access: "view"
25836
+ },
25711
25837
  "pipelineAnalytics.listRecentTracks": {
25712
25838
  capName: "pipeline-analytics",
25713
25839
  capScope: "device",
@@ -25720,6 +25846,12 @@ Object.freeze({
25720
25846
  addonId: null,
25721
25847
  access: "view"
25722
25848
  },
25849
+ "pipelineAnalytics.pruneEvents": {
25850
+ capName: "pipeline-analytics",
25851
+ capScope: "device",
25852
+ addonId: null,
25853
+ access: "create"
25854
+ },
25723
25855
  "pipelineAnalytics.pruneEventsBefore": {
25724
25856
  capName: "pipeline-analytics",
25725
25857
  capScope: "device",
@@ -26482,6 +26614,12 @@ Object.freeze({
26482
26614
  addonId: null,
26483
26615
  access: "create"
26484
26616
  },
26617
+ "recording.deleteFootprint": {
26618
+ capName: "recording",
26619
+ capScope: "system",
26620
+ addonId: null,
26621
+ access: "delete"
26622
+ },
26485
26623
  "recording.getAvailability": {
26486
26624
  capName: "recording",
26487
26625
  capScope: "system",
@@ -26512,6 +26650,12 @@ Object.freeze({
26512
26650
  addonId: null,
26513
26651
  access: "view"
26514
26652
  },
26653
+ "recording.listOpsLog": {
26654
+ capName: "recording",
26655
+ capScope: "system",
26656
+ addonId: null,
26657
+ access: "view"
26658
+ },
26515
26659
  "recording.locateSegment": {
26516
26660
  capName: "recording",
26517
26661
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",