@camstack/addon-import-alexa 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
@@ -7514,6 +7514,62 @@ var RecordingConfigSchema = object({
7514
7514
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7515
7515
  });
7516
7516
  /**
7517
+ * Ops-log — the durable, append-only operations audit shared by the
7518
+ * recordings and events management surfaces.
7519
+ *
7520
+ * ONE row shape is reused for both domains so a single "Activity" view can
7521
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7522
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7523
+ * management operation, WHY it ran (reason), and its measurable effect
7524
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7525
+ * never fail the operation it records.
7526
+ */
7527
+ /** Which management domain the operation belongs to. */
7528
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7529
+ /** The kind of management operation performed. */
7530
+ var OpsLogOpSchema = _enum([
7531
+ "prune",
7532
+ "manual-delete",
7533
+ "rescan",
7534
+ "retention-run"
7535
+ ]);
7536
+ /** Why the operation ran. */
7537
+ var OpsLogReasonSchema = _enum([
7538
+ "retention",
7539
+ "quota",
7540
+ "manual",
7541
+ "operator"
7542
+ ]);
7543
+ /** One audit row, shared verbatim by both domains. */
7544
+ var OpsLogEntrySchema = object({
7545
+ /** Unique row id. */
7546
+ id: string(),
7547
+ /** Epoch ms the operation completed. */
7548
+ at: number(),
7549
+ domain: OpsLogDomainSchema,
7550
+ op: OpsLogOpSchema,
7551
+ reason: OpsLogReasonSchema,
7552
+ /** The camera the op targeted; null for a cluster/global op. */
7553
+ deviceId: number().nullable(),
7554
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7555
+ nodeId: string(),
7556
+ /** Buckets / rows deleted (op-specific unit). */
7557
+ itemsAffected: number(),
7558
+ /** Bytes reclaimed by the op (0 when not measurable). */
7559
+ bytesReclaimed: number(),
7560
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7561
+ detail: string().nullable(),
7562
+ /** Who/what triggered the op. */
7563
+ actor: string()
7564
+ });
7565
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7566
+ var OpsLogQueryInputSchema = object({
7567
+ /** Restrict to a single camera; omit for every row. */
7568
+ deviceId: number().optional(),
7569
+ /** Max rows returned, newest-first. */
7570
+ limit: number().int().min(1).max(1e3).optional()
7571
+ });
7572
+ /**
7517
7573
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7518
7574
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7519
7575
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14977,9 +15033,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14977
15033
  * `package` backs the package-drop detector — a package zone is a
14978
15034
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14979
15035
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14980
- * The orchestrator provider that writes this stage lands in a later
14981
- * slice; until then the mirror carries only `{motion, detection}` and
14982
- * consumers read `package` as absent (treat as `[]`).
15036
+ * The orchestrator provider writes this stage as a first-class slice
15037
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
15038
+ * package}` shape, so consumers read the current package rules directly
15039
+ * off `device.state.zoneRules.value.package`.
14983
15040
  */
14984
15041
  runtimeState: object({
14985
15042
  motion: array(ZoneRuleSchema).readonly(),
@@ -19381,6 +19438,26 @@ var TrackCascadeCountsSchema = object({
19381
19438
  /** Per-track CLIP search vectors removed (best-effort). */
19382
19439
  embeddings: number().int()
19383
19440
  });
19441
+ /** Event-store footprint for one camera. */
19442
+ var EventStoreDeviceFootprintSchema = object({
19443
+ deviceId: number(),
19444
+ /** Persisted event rows (motion + object + audio) for the camera. */
19445
+ rows: number().int(),
19446
+ /** Event-owned media bytes on disk for the camera. */
19447
+ bytes: number().int()
19448
+ });
19449
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19450
+ var EventStoreFootprintSchema = object({
19451
+ totalRows: number().int(),
19452
+ totalBytes: number().int(),
19453
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19454
+ });
19455
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19456
+ var EventPruneCountsSchema = object({
19457
+ motion: number().int(),
19458
+ object: number().int(),
19459
+ audio: number().int()
19460
+ });
19384
19461
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19385
19462
  deviceId: number(),
19386
19463
  trackId: string()
@@ -19444,6 +19521,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19444
19521
  }), {
19445
19522
  kind: "mutation",
19446
19523
  auth: "admin"
19524
+ }), method(object({}), EventStoreFootprintSchema, {
19525
+ kind: "query",
19526
+ auth: "admin"
19527
+ }), method(object({
19528
+ olderThanMs: number(),
19529
+ reason: OpsLogReasonSchema.optional()
19530
+ }), EventPruneCountsSchema, {
19531
+ kind: "mutation",
19532
+ auth: "admin"
19533
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19534
+ kind: "mutation",
19535
+ auth: "admin"
19536
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19537
+ kind: "query",
19538
+ auth: "admin"
19447
19539
  }), method(object({
19448
19540
  eventId: string(),
19449
19541
  kind: MediaFileKindEnum.optional()
@@ -22694,13 +22786,29 @@ method(object({
22694
22786
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22695
22787
  kind: "mutation",
22696
22788
  auth: "admin"
22697
- }), method(object({ deviceId: number() }), object({
22789
+ }), method(object({
22790
+ deviceId: number(),
22791
+ reason: OpsLogReasonSchema.optional()
22792
+ }), object({
22698
22793
  floorMs: number().nullable(),
22699
22794
  deletedBuckets: number().int(),
22700
22795
  reclaimedBytes: number().int()
22701
22796
  }), {
22702
22797
  kind: "mutation",
22703
22798
  auth: "admin"
22799
+ }), method(object({
22800
+ deviceId: number(),
22801
+ fromMs: number().optional(),
22802
+ toMs: number().optional()
22803
+ }), object({
22804
+ deletedBuckets: number().int(),
22805
+ reclaimedBytes: number().int()
22806
+ }), {
22807
+ kind: "mutation",
22808
+ auth: "admin"
22809
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22810
+ kind: "query",
22811
+ auth: "admin"
22704
22812
  });
22705
22813
  /**
22706
22814
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25822,6 +25930,12 @@ Object.freeze({
25822
25930
  addonId: null,
25823
25931
  access: "delete"
25824
25932
  },
25933
+ "pipelineAnalytics.deleteDeviceEvents": {
25934
+ capName: "pipeline-analytics",
25935
+ capScope: "device",
25936
+ addonId: null,
25937
+ access: "delete"
25938
+ },
25825
25939
  "pipelineAnalytics.deleteTracks": {
25826
25940
  capName: "pipeline-analytics",
25827
25941
  capScope: "device",
@@ -25852,6 +25966,12 @@ Object.freeze({
25852
25966
  addonId: null,
25853
25967
  access: "view"
25854
25968
  },
25969
+ "pipelineAnalytics.getEventStoreFootprint": {
25970
+ capName: "pipeline-analytics",
25971
+ capScope: "device",
25972
+ addonId: null,
25973
+ access: "view"
25974
+ },
25855
25975
  "pipelineAnalytics.getKeyEvents": {
25856
25976
  capName: "pipeline-analytics",
25857
25977
  capScope: "device",
@@ -25894,6 +26014,12 @@ Object.freeze({
25894
26014
  addonId: null,
25895
26015
  access: "view"
25896
26016
  },
26017
+ "pipelineAnalytics.listOpsLog": {
26018
+ capName: "pipeline-analytics",
26019
+ capScope: "device",
26020
+ addonId: null,
26021
+ access: "view"
26022
+ },
25897
26023
  "pipelineAnalytics.listRecentTracks": {
25898
26024
  capName: "pipeline-analytics",
25899
26025
  capScope: "device",
@@ -25906,6 +26032,12 @@ Object.freeze({
25906
26032
  addonId: null,
25907
26033
  access: "view"
25908
26034
  },
26035
+ "pipelineAnalytics.pruneEvents": {
26036
+ capName: "pipeline-analytics",
26037
+ capScope: "device",
26038
+ addonId: null,
26039
+ access: "create"
26040
+ },
25909
26041
  "pipelineAnalytics.pruneEventsBefore": {
25910
26042
  capName: "pipeline-analytics",
25911
26043
  capScope: "device",
@@ -26668,6 +26800,12 @@ Object.freeze({
26668
26800
  addonId: null,
26669
26801
  access: "create"
26670
26802
  },
26803
+ "recording.deleteFootprint": {
26804
+ capName: "recording",
26805
+ capScope: "system",
26806
+ addonId: null,
26807
+ access: "delete"
26808
+ },
26671
26809
  "recording.getAvailability": {
26672
26810
  capName: "recording",
26673
26811
  capScope: "system",
@@ -26698,6 +26836,12 @@ Object.freeze({
26698
26836
  addonId: null,
26699
26837
  access: "view"
26700
26838
  },
26839
+ "recording.listOpsLog": {
26840
+ capName: "recording",
26841
+ capScope: "system",
26842
+ addonId: null,
26843
+ access: "view"
26844
+ },
26701
26845
  "recording.locateSegment": {
26702
26846
  capName: "recording",
26703
26847
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -7514,6 +7514,62 @@ var RecordingConfigSchema = object({
7514
7514
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7515
7515
  });
7516
7516
  /**
7517
+ * Ops-log — the durable, append-only operations audit shared by the
7518
+ * recordings and events management surfaces.
7519
+ *
7520
+ * ONE row shape is reused for both domains so a single "Activity" view can
7521
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7522
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7523
+ * management operation, WHY it ran (reason), and its measurable effect
7524
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7525
+ * never fail the operation it records.
7526
+ */
7527
+ /** Which management domain the operation belongs to. */
7528
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7529
+ /** The kind of management operation performed. */
7530
+ var OpsLogOpSchema = _enum([
7531
+ "prune",
7532
+ "manual-delete",
7533
+ "rescan",
7534
+ "retention-run"
7535
+ ]);
7536
+ /** Why the operation ran. */
7537
+ var OpsLogReasonSchema = _enum([
7538
+ "retention",
7539
+ "quota",
7540
+ "manual",
7541
+ "operator"
7542
+ ]);
7543
+ /** One audit row, shared verbatim by both domains. */
7544
+ var OpsLogEntrySchema = object({
7545
+ /** Unique row id. */
7546
+ id: string(),
7547
+ /** Epoch ms the operation completed. */
7548
+ at: number(),
7549
+ domain: OpsLogDomainSchema,
7550
+ op: OpsLogOpSchema,
7551
+ reason: OpsLogReasonSchema,
7552
+ /** The camera the op targeted; null for a cluster/global op. */
7553
+ deviceId: number().nullable(),
7554
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7555
+ nodeId: string(),
7556
+ /** Buckets / rows deleted (op-specific unit). */
7557
+ itemsAffected: number(),
7558
+ /** Bytes reclaimed by the op (0 when not measurable). */
7559
+ bytesReclaimed: number(),
7560
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7561
+ detail: string().nullable(),
7562
+ /** Who/what triggered the op. */
7563
+ actor: string()
7564
+ });
7565
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7566
+ var OpsLogQueryInputSchema = object({
7567
+ /** Restrict to a single camera; omit for every row. */
7568
+ deviceId: number().optional(),
7569
+ /** Max rows returned, newest-first. */
7570
+ limit: number().int().min(1).max(1e3).optional()
7571
+ });
7572
+ /**
7517
7573
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7518
7574
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7519
7575
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -14977,9 +15033,10 @@ var DEVICE_LOCAL_STATE_CAPS = {
14977
15033
  * `package` backs the package-drop detector — a package zone is a
14978
15034
  * `ZoneRule` on the `'package'` stage referencing drawn polygons
14979
15035
  * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
14980
- * The orchestrator provider that writes this stage lands in a later
14981
- * slice; until then the mirror carries only `{motion, detection}` and
14982
- * consumers read `package` as absent (treat as `[]`).
15036
+ * The orchestrator provider writes this stage as a first-class slice
15037
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
15038
+ * package}` shape, so consumers read the current package rules directly
15039
+ * off `device.state.zoneRules.value.package`.
14983
15040
  */
14984
15041
  runtimeState: object({
14985
15042
  motion: array(ZoneRuleSchema).readonly(),
@@ -19381,6 +19438,26 @@ var TrackCascadeCountsSchema = object({
19381
19438
  /** Per-track CLIP search vectors removed (best-effort). */
19382
19439
  embeddings: number().int()
19383
19440
  });
19441
+ /** Event-store footprint for one camera. */
19442
+ var EventStoreDeviceFootprintSchema = object({
19443
+ deviceId: number(),
19444
+ /** Persisted event rows (motion + object + audio) for the camera. */
19445
+ rows: number().int(),
19446
+ /** Event-owned media bytes on disk for the camera. */
19447
+ bytes: number().int()
19448
+ });
19449
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
19450
+ var EventStoreFootprintSchema = object({
19451
+ totalRows: number().int(),
19452
+ totalBytes: number().int(),
19453
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
19454
+ });
19455
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
19456
+ var EventPruneCountsSchema = object({
19457
+ motion: number().int(),
19458
+ object: number().int(),
19459
+ audio: number().int()
19460
+ });
19384
19461
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
19385
19462
  deviceId: number(),
19386
19463
  trackId: string()
@@ -19444,6 +19521,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19444
19521
  }), {
19445
19522
  kind: "mutation",
19446
19523
  auth: "admin"
19524
+ }), method(object({}), EventStoreFootprintSchema, {
19525
+ kind: "query",
19526
+ auth: "admin"
19527
+ }), method(object({
19528
+ olderThanMs: number(),
19529
+ reason: OpsLogReasonSchema.optional()
19530
+ }), EventPruneCountsSchema, {
19531
+ kind: "mutation",
19532
+ auth: "admin"
19533
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
19534
+ kind: "mutation",
19535
+ auth: "admin"
19536
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19537
+ kind: "query",
19538
+ auth: "admin"
19447
19539
  }), method(object({
19448
19540
  eventId: string(),
19449
19541
  kind: MediaFileKindEnum.optional()
@@ -22694,13 +22786,29 @@ method(object({
22694
22786
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
22695
22787
  kind: "mutation",
22696
22788
  auth: "admin"
22697
- }), method(object({ deviceId: number() }), object({
22789
+ }), method(object({
22790
+ deviceId: number(),
22791
+ reason: OpsLogReasonSchema.optional()
22792
+ }), object({
22698
22793
  floorMs: number().nullable(),
22699
22794
  deletedBuckets: number().int(),
22700
22795
  reclaimedBytes: number().int()
22701
22796
  }), {
22702
22797
  kind: "mutation",
22703
22798
  auth: "admin"
22799
+ }), method(object({
22800
+ deviceId: number(),
22801
+ fromMs: number().optional(),
22802
+ toMs: number().optional()
22803
+ }), object({
22804
+ deletedBuckets: number().int(),
22805
+ reclaimedBytes: number().int()
22806
+ }), {
22807
+ kind: "mutation",
22808
+ auth: "admin"
22809
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
22810
+ kind: "query",
22811
+ auth: "admin"
22704
22812
  });
22705
22813
  /**
22706
22814
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25822,6 +25930,12 @@ Object.freeze({
25822
25930
  addonId: null,
25823
25931
  access: "delete"
25824
25932
  },
25933
+ "pipelineAnalytics.deleteDeviceEvents": {
25934
+ capName: "pipeline-analytics",
25935
+ capScope: "device",
25936
+ addonId: null,
25937
+ access: "delete"
25938
+ },
25825
25939
  "pipelineAnalytics.deleteTracks": {
25826
25940
  capName: "pipeline-analytics",
25827
25941
  capScope: "device",
@@ -25852,6 +25966,12 @@ Object.freeze({
25852
25966
  addonId: null,
25853
25967
  access: "view"
25854
25968
  },
25969
+ "pipelineAnalytics.getEventStoreFootprint": {
25970
+ capName: "pipeline-analytics",
25971
+ capScope: "device",
25972
+ addonId: null,
25973
+ access: "view"
25974
+ },
25855
25975
  "pipelineAnalytics.getKeyEvents": {
25856
25976
  capName: "pipeline-analytics",
25857
25977
  capScope: "device",
@@ -25894,6 +26014,12 @@ Object.freeze({
25894
26014
  addonId: null,
25895
26015
  access: "view"
25896
26016
  },
26017
+ "pipelineAnalytics.listOpsLog": {
26018
+ capName: "pipeline-analytics",
26019
+ capScope: "device",
26020
+ addonId: null,
26021
+ access: "view"
26022
+ },
25897
26023
  "pipelineAnalytics.listRecentTracks": {
25898
26024
  capName: "pipeline-analytics",
25899
26025
  capScope: "device",
@@ -25906,6 +26032,12 @@ Object.freeze({
25906
26032
  addonId: null,
25907
26033
  access: "view"
25908
26034
  },
26035
+ "pipelineAnalytics.pruneEvents": {
26036
+ capName: "pipeline-analytics",
26037
+ capScope: "device",
26038
+ addonId: null,
26039
+ access: "create"
26040
+ },
25909
26041
  "pipelineAnalytics.pruneEventsBefore": {
25910
26042
  capName: "pipeline-analytics",
25911
26043
  capScope: "device",
@@ -26668,6 +26800,12 @@ Object.freeze({
26668
26800
  addonId: null,
26669
26801
  access: "create"
26670
26802
  },
26803
+ "recording.deleteFootprint": {
26804
+ capName: "recording",
26805
+ capScope: "system",
26806
+ addonId: null,
26807
+ access: "delete"
26808
+ },
26671
26809
  "recording.getAvailability": {
26672
26810
  capName: "recording",
26673
26811
  capScope: "system",
@@ -26698,6 +26836,12 @@ Object.freeze({
26698
26836
  addonId: null,
26699
26837
  access: "view"
26700
26838
  },
26839
+ "recording.listOpsLog": {
26840
+ capName: "recording",
26841
+ capScope: "system",
26842
+ addonId: null,
26843
+ access: "view"
26844
+ },
26701
26845
  "recording.locateSegment": {
26702
26846
  capName: "recording",
26703
26847
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",