@camstack/addon-smtp-nodemailer 1.1.24 → 1.1.26

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.
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  }) : target, mod));
37
37
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-H4AVePnn.mjs
39
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -189,6 +189,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
189
189
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
190
190
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
191
191
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
192
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
193
+ * progress bar the client reconciles via `recordingExport.getExport`. */
194
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
195
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
196
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
192
197
  EventCategory["DetectionEvent"] = "detection.event";
193
198
  EventCategory["SessionTrackNew"] = "session.track.new";
194
199
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -478,6 +483,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
478
483
  */
479
484
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
480
485
  /**
486
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
487
+ * a package zone — a newly-appeared stationary object of a package class
488
+ * that cleared the class / zone / dwell / size gates. Payload:
489
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
490
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
491
+ * Telemetry (D8): the durable record is the `package-events` store row;
492
+ * this bus topic drives notifier rules + live UI. See
493
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
494
+ */
495
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
496
+ /**
497
+ * Fired by `addon-post-analysis` when a previously-delivered package
498
+ * leaves its zone (the stationary entry departed — moved or swept).
499
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
500
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
501
+ * Telemetry (D8). See package-zones-design §5.2.
502
+ */
503
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
504
+ /**
481
505
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
482
506
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
483
507
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5216,6 +5240,25 @@ function _instanceof(cls, params = {}) {
5216
5240
  };
5217
5241
  return inst;
5218
5242
  }
5243
+ //#endregion
5244
+ //#region ../../node_modules/zod/v4/classic/compat.js
5245
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5246
+ var ZodIssueCode = {
5247
+ invalid_type: "invalid_type",
5248
+ too_big: "too_big",
5249
+ too_small: "too_small",
5250
+ invalid_format: "invalid_format",
5251
+ not_multiple_of: "not_multiple_of",
5252
+ unrecognized_keys: "unrecognized_keys",
5253
+ invalid_union: "invalid_union",
5254
+ invalid_key: "invalid_key",
5255
+ invalid_element: "invalid_element",
5256
+ invalid_value: "invalid_value",
5257
+ custom: "custom"
5258
+ };
5259
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5260
+ var ZodFirstPartyTypeKind;
5261
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5219
5262
  Object.fromEntries([
5220
5263
  {
5221
5264
  id: "overview",
@@ -7322,6 +7365,62 @@ var RecordingConfigSchema = object({
7322
7365
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7323
7366
  });
7324
7367
  /**
7368
+ * Ops-log — the durable, append-only operations audit shared by the
7369
+ * recordings and events management surfaces.
7370
+ *
7371
+ * ONE row shape is reused for both domains so a single "Activity" view can
7372
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7373
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7374
+ * management operation, WHY it ran (reason), and its measurable effect
7375
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7376
+ * never fail the operation it records.
7377
+ */
7378
+ /** Which management domain the operation belongs to. */
7379
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7380
+ /** The kind of management operation performed. */
7381
+ var OpsLogOpSchema = _enum([
7382
+ "prune",
7383
+ "manual-delete",
7384
+ "rescan",
7385
+ "retention-run"
7386
+ ]);
7387
+ /** Why the operation ran. */
7388
+ var OpsLogReasonSchema = _enum([
7389
+ "retention",
7390
+ "quota",
7391
+ "manual",
7392
+ "operator"
7393
+ ]);
7394
+ /** One audit row, shared verbatim by both domains. */
7395
+ var OpsLogEntrySchema = object({
7396
+ /** Unique row id. */
7397
+ id: string(),
7398
+ /** Epoch ms the operation completed. */
7399
+ at: number(),
7400
+ domain: OpsLogDomainSchema,
7401
+ op: OpsLogOpSchema,
7402
+ reason: OpsLogReasonSchema,
7403
+ /** The camera the op targeted; null for a cluster/global op. */
7404
+ deviceId: number().nullable(),
7405
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7406
+ nodeId: string(),
7407
+ /** Buckets / rows deleted (op-specific unit). */
7408
+ itemsAffected: number(),
7409
+ /** Bytes reclaimed by the op (0 when not measurable). */
7410
+ bytesReclaimed: number(),
7411
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7412
+ detail: string().nullable(),
7413
+ /** Who/what triggered the op. */
7414
+ actor: string()
7415
+ });
7416
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7417
+ var OpsLogQueryInputSchema = object({
7418
+ /** Restrict to a single camera; omit for every row. */
7419
+ deviceId: number().optional(),
7420
+ /** Max rows returned, newest-first. */
7421
+ limit: number().int().min(1).max(1e3).optional()
7422
+ });
7423
+ /**
7325
7424
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7326
7425
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7327
7426
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -12571,7 +12670,11 @@ array(ZoneRuleSchema).readonly();
12571
12670
  * Extend the enum here when a new gating consumer comes online (audio
12572
12671
  * gating, alert filtering, …) — no other surface needs to change.
12573
12672
  */
12574
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12673
+ var ZoneRuleStageEnum = _enum([
12674
+ "motion",
12675
+ "detection",
12676
+ "package"
12677
+ ]);
12575
12678
  DeviceType.Camera, method(object({
12576
12679
  deviceId: number(),
12577
12680
  stage: ZoneRuleStageEnum
@@ -12584,7 +12687,8 @@ DeviceType.Camera, method(object({
12584
12687
  auth: "admin"
12585
12688
  }), object({
12586
12689
  motion: array(ZoneRuleSchema).readonly(),
12587
- detection: array(ZoneRuleSchema).readonly()
12690
+ detection: array(ZoneRuleSchema).readonly(),
12691
+ package: array(ZoneRuleSchema).readonly()
12588
12692
  });
12589
12693
  var ProviderStatusSchema = object({
12590
12694
  connected: boolean(),
@@ -15767,6 +15871,7 @@ var EventKindIconSchema = _enum([
15767
15871
  "smoke",
15768
15872
  "water",
15769
15873
  "button",
15874
+ "package",
15770
15875
  "generic"
15771
15876
  ]);
15772
15877
  var EventKindCategorySchema = _enum([
@@ -15774,7 +15879,8 @@ var EventKindCategorySchema = _enum([
15774
15879
  "audio",
15775
15880
  "detection",
15776
15881
  "sensor",
15777
- "custom"
15882
+ "custom",
15883
+ "package"
15778
15884
  ]);
15779
15885
  var EventKindDescriptorSchema = object({
15780
15886
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -16115,6 +16221,26 @@ var TrackCascadeCountsSchema = object({
16115
16221
  /** Per-track CLIP search vectors removed (best-effort). */
16116
16222
  embeddings: number().int()
16117
16223
  });
16224
+ /** Event-store footprint for one camera. */
16225
+ var EventStoreDeviceFootprintSchema = object({
16226
+ deviceId: number(),
16227
+ /** Persisted event rows (motion + object + audio) for the camera. */
16228
+ rows: number().int(),
16229
+ /** Event-owned media bytes on disk for the camera. */
16230
+ bytes: number().int()
16231
+ });
16232
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16233
+ var EventStoreFootprintSchema = object({
16234
+ totalRows: number().int(),
16235
+ totalBytes: number().int(),
16236
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16237
+ });
16238
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16239
+ var EventPruneCountsSchema = object({
16240
+ motion: number().int(),
16241
+ object: number().int(),
16242
+ audio: number().int()
16243
+ });
16118
16244
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16119
16245
  deviceId: number(),
16120
16246
  trackId: string()
@@ -16178,6 +16304,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16178
16304
  }), {
16179
16305
  kind: "mutation",
16180
16306
  auth: "admin"
16307
+ }), method(object({}), EventStoreFootprintSchema, {
16308
+ kind: "query",
16309
+ auth: "admin"
16310
+ }), method(object({
16311
+ olderThanMs: number(),
16312
+ reason: OpsLogReasonSchema.optional()
16313
+ }), EventPruneCountsSchema, {
16314
+ kind: "mutation",
16315
+ auth: "admin"
16316
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16317
+ kind: "mutation",
16318
+ auth: "admin"
16319
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16320
+ kind: "query",
16321
+ auth: "admin"
16181
16322
  }), method(object({
16182
16323
  eventId: string(),
16183
16324
  kind: MediaFileKindEnum.optional()
@@ -19424,13 +19565,131 @@ method(object({
19424
19565
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19425
19566
  kind: "mutation",
19426
19567
  auth: "admin"
19427
- }), method(object({ deviceId: number() }), object({
19568
+ }), method(object({
19569
+ deviceId: number(),
19570
+ reason: OpsLogReasonSchema.optional()
19571
+ }), object({
19428
19572
  floorMs: number().nullable(),
19429
19573
  deletedBuckets: number().int(),
19430
19574
  reclaimedBytes: number().int()
19431
19575
  }), {
19432
19576
  kind: "mutation",
19433
19577
  auth: "admin"
19578
+ }), method(object({
19579
+ deviceId: number(),
19580
+ fromMs: number().optional(),
19581
+ toMs: number().optional()
19582
+ }), object({
19583
+ deletedBuckets: number().int(),
19584
+ reclaimedBytes: number().int()
19585
+ }), {
19586
+ kind: "mutation",
19587
+ auth: "admin"
19588
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19589
+ kind: "query",
19590
+ auth: "admin"
19591
+ });
19592
+ /**
19593
+ * `recordingExport` cap — render a footage time range into a single downloadable
19594
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19595
+ * bounded lifetime with a durable history, auto-expiry, and optional
19596
+ * delete-after-download.
19597
+ *
19598
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19599
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19600
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19601
+ * input and dispatch to that single provider; the render runs on the node that
19602
+ * owns the footage (no cross-node segment transfer). Download rides the
19603
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19604
+ * SQLite); history rows survive file deletion for audit.
19605
+ */
19606
+ /** Playback-speed multiplier for the render (1 = realtime). */
19607
+ var ExportSpeedSchema = number().min(.25).max(32);
19608
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19609
+ var ExportTimelapseSchema = object({
19610
+ everyMs: number().int().positive(),
19611
+ outputFps: number().int().min(1).max(60).optional()
19612
+ });
19613
+ /**
19614
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19615
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19616
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19617
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19618
+ */
19619
+ var ExportOptionsSchema = object({
19620
+ speed: ExportSpeedSchema.optional(),
19621
+ timelapse: ExportTimelapseSchema.optional(),
19622
+ includeAudio: boolean(),
19623
+ maxLifeMs: number().int().positive(),
19624
+ deleteAfterDownload: boolean(),
19625
+ title: string().max(200).optional()
19626
+ }).superRefine((v, ctx) => {
19627
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19628
+ code: ZodIssueCode.custom,
19629
+ message: "speed and timelapse are mutually exclusive",
19630
+ path: ["timelapse"]
19631
+ });
19632
+ });
19633
+ var ExportStateSchema = _enum([
19634
+ "queued",
19635
+ "rendering",
19636
+ "ready",
19637
+ "failed",
19638
+ "expired",
19639
+ "deleted"
19640
+ ]);
19641
+ /** One export job / history row. */
19642
+ var ExportRecordSchema = object({
19643
+ id: string(),
19644
+ deviceId: number(),
19645
+ profile: string(),
19646
+ fromMs: number(),
19647
+ toMs: number(),
19648
+ options: ExportOptionsSchema,
19649
+ state: ExportStateSchema,
19650
+ /** 0–100 while rendering; null otherwise. */
19651
+ progressPct: number().nullable(),
19652
+ /** File size once ready; null before. */
19653
+ fileBytes: number().nullable(),
19654
+ expiresAt: number(),
19655
+ deleteAfterDownload: boolean(),
19656
+ /** Epoch of the first complete download; null until then. */
19657
+ downloadedAt: number().nullable(),
19658
+ createdAt: number(),
19659
+ /** User id/name that requested the export. */
19660
+ createdBy: string(),
19661
+ /** Failure reason when state is 'failed'; null otherwise. */
19662
+ error: string().nullable()
19663
+ });
19664
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19665
+ var ExportDownloadSchema = object({
19666
+ url: string(),
19667
+ endpoints: array(string())
19668
+ });
19669
+ method(object({
19670
+ deviceId: number(),
19671
+ profile: string(),
19672
+ fromMs: number(),
19673
+ toMs: number(),
19674
+ options: ExportOptionsSchema
19675
+ }), ExportRecordSchema, {
19676
+ kind: "mutation",
19677
+ auth: "protected"
19678
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19679
+ kind: "query",
19680
+ auth: "protected"
19681
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19682
+ kind: "query",
19683
+ auth: "protected"
19684
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19685
+ kind: "mutation",
19686
+ auth: "protected"
19687
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19688
+ kind: "mutation",
19689
+ auth: "protected"
19690
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19691
+ kind: "query",
19692
+ auth: "protected"
19434
19693
  });
19435
19694
  /**
19436
19695
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -22450,6 +22709,12 @@ Object.freeze({
22450
22709
  addonId: null,
22451
22710
  access: "delete"
22452
22711
  },
22712
+ "pipelineAnalytics.deleteDeviceEvents": {
22713
+ capName: "pipeline-analytics",
22714
+ capScope: "device",
22715
+ addonId: null,
22716
+ access: "delete"
22717
+ },
22453
22718
  "pipelineAnalytics.deleteTracks": {
22454
22719
  capName: "pipeline-analytics",
22455
22720
  capScope: "device",
@@ -22480,6 +22745,12 @@ Object.freeze({
22480
22745
  addonId: null,
22481
22746
  access: "view"
22482
22747
  },
22748
+ "pipelineAnalytics.getEventStoreFootprint": {
22749
+ capName: "pipeline-analytics",
22750
+ capScope: "device",
22751
+ addonId: null,
22752
+ access: "view"
22753
+ },
22483
22754
  "pipelineAnalytics.getKeyEvents": {
22484
22755
  capName: "pipeline-analytics",
22485
22756
  capScope: "device",
@@ -22522,6 +22793,12 @@ Object.freeze({
22522
22793
  addonId: null,
22523
22794
  access: "view"
22524
22795
  },
22796
+ "pipelineAnalytics.listOpsLog": {
22797
+ capName: "pipeline-analytics",
22798
+ capScope: "device",
22799
+ addonId: null,
22800
+ access: "view"
22801
+ },
22525
22802
  "pipelineAnalytics.listRecentTracks": {
22526
22803
  capName: "pipeline-analytics",
22527
22804
  capScope: "device",
@@ -22534,6 +22811,12 @@ Object.freeze({
22534
22811
  addonId: null,
22535
22812
  access: "view"
22536
22813
  },
22814
+ "pipelineAnalytics.pruneEvents": {
22815
+ capName: "pipeline-analytics",
22816
+ capScope: "device",
22817
+ addonId: null,
22818
+ access: "create"
22819
+ },
22537
22820
  "pipelineAnalytics.pruneEventsBefore": {
22538
22821
  capName: "pipeline-analytics",
22539
22822
  capScope: "device",
@@ -23296,6 +23579,12 @@ Object.freeze({
23296
23579
  addonId: null,
23297
23580
  access: "create"
23298
23581
  },
23582
+ "recording.deleteFootprint": {
23583
+ capName: "recording",
23584
+ capScope: "system",
23585
+ addonId: null,
23586
+ access: "delete"
23587
+ },
23299
23588
  "recording.getAvailability": {
23300
23589
  capName: "recording",
23301
23590
  capScope: "system",
@@ -23326,6 +23615,12 @@ Object.freeze({
23326
23615
  addonId: null,
23327
23616
  access: "view"
23328
23617
  },
23618
+ "recording.listOpsLog": {
23619
+ capName: "recording",
23620
+ capScope: "system",
23621
+ addonId: null,
23622
+ access: "view"
23623
+ },
23329
23624
  "recording.locateSegment": {
23330
23625
  capName: "recording",
23331
23626
  capScope: "system",
@@ -23356,6 +23651,42 @@ Object.freeze({
23356
23651
  addonId: null,
23357
23652
  access: "create"
23358
23653
  },
23654
+ "recordingExport.cancelExport": {
23655
+ capName: "recordingExport",
23656
+ capScope: "system",
23657
+ addonId: null,
23658
+ access: "create"
23659
+ },
23660
+ "recordingExport.createExport": {
23661
+ capName: "recordingExport",
23662
+ capScope: "system",
23663
+ addonId: null,
23664
+ access: "create"
23665
+ },
23666
+ "recordingExport.deleteExport": {
23667
+ capName: "recordingExport",
23668
+ capScope: "system",
23669
+ addonId: null,
23670
+ access: "delete"
23671
+ },
23672
+ "recordingExport.getDownloadUrl": {
23673
+ capName: "recordingExport",
23674
+ capScope: "system",
23675
+ addonId: null,
23676
+ access: "view"
23677
+ },
23678
+ "recordingExport.getExport": {
23679
+ capName: "recordingExport",
23680
+ capScope: "system",
23681
+ addonId: null,
23682
+ access: "view"
23683
+ },
23684
+ "recordingExport.listExports": {
23685
+ capName: "recordingExport",
23686
+ capScope: "system",
23687
+ addonId: null,
23688
+ access: "view"
23689
+ },
23359
23690
  "sceneMonitor.captureReference": {
23360
23691
  capName: "scene-monitor",
23361
23692
  capScope: "device",
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
36
  //#endregion
37
- //#region ../types/dist/event-category-H4AVePnn.mjs
37
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
38
38
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
39
39
  EventCategory["SystemBoot"] = "system.boot";
40
40
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -187,6 +187,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
187
187
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
188
188
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
189
189
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
190
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
191
+ * progress bar the client reconciles via `recordingExport.getExport`. */
192
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
193
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
194
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
190
195
  EventCategory["DetectionEvent"] = "detection.event";
191
196
  EventCategory["SessionTrackNew"] = "session.track.new";
192
197
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -476,6 +481,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
476
481
  */
477
482
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
478
483
  /**
484
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
485
+ * a package zone — a newly-appeared stationary object of a package class
486
+ * that cleared the class / zone / dwell / size gates. Payload:
487
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
488
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
489
+ * Telemetry (D8): the durable record is the `package-events` store row;
490
+ * this bus topic drives notifier rules + live UI. See
491
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
492
+ */
493
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
494
+ /**
495
+ * Fired by `addon-post-analysis` when a previously-delivered package
496
+ * leaves its zone (the stationary entry departed — moved or swept).
497
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
498
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
499
+ * Telemetry (D8). See package-zones-design §5.2.
500
+ */
501
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
502
+ /**
479
503
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
480
504
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
481
505
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5214,6 +5238,25 @@ function _instanceof(cls, params = {}) {
5214
5238
  };
5215
5239
  return inst;
5216
5240
  }
5241
+ //#endregion
5242
+ //#region ../../node_modules/zod/v4/classic/compat.js
5243
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5244
+ var ZodIssueCode = {
5245
+ invalid_type: "invalid_type",
5246
+ too_big: "too_big",
5247
+ too_small: "too_small",
5248
+ invalid_format: "invalid_format",
5249
+ not_multiple_of: "not_multiple_of",
5250
+ unrecognized_keys: "unrecognized_keys",
5251
+ invalid_union: "invalid_union",
5252
+ invalid_key: "invalid_key",
5253
+ invalid_element: "invalid_element",
5254
+ invalid_value: "invalid_value",
5255
+ custom: "custom"
5256
+ };
5257
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5258
+ var ZodFirstPartyTypeKind;
5259
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5217
5260
  Object.fromEntries([
5218
5261
  {
5219
5262
  id: "overview",
@@ -7320,6 +7363,62 @@ var RecordingConfigSchema = object({
7320
7363
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7321
7364
  });
7322
7365
  /**
7366
+ * Ops-log — the durable, append-only operations audit shared by the
7367
+ * recordings and events management surfaces.
7368
+ *
7369
+ * ONE row shape is reused for both domains so a single "Activity" view can
7370
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7371
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7372
+ * management operation, WHY it ran (reason), and its measurable effect
7373
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7374
+ * never fail the operation it records.
7375
+ */
7376
+ /** Which management domain the operation belongs to. */
7377
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7378
+ /** The kind of management operation performed. */
7379
+ var OpsLogOpSchema = _enum([
7380
+ "prune",
7381
+ "manual-delete",
7382
+ "rescan",
7383
+ "retention-run"
7384
+ ]);
7385
+ /** Why the operation ran. */
7386
+ var OpsLogReasonSchema = _enum([
7387
+ "retention",
7388
+ "quota",
7389
+ "manual",
7390
+ "operator"
7391
+ ]);
7392
+ /** One audit row, shared verbatim by both domains. */
7393
+ var OpsLogEntrySchema = object({
7394
+ /** Unique row id. */
7395
+ id: string(),
7396
+ /** Epoch ms the operation completed. */
7397
+ at: number(),
7398
+ domain: OpsLogDomainSchema,
7399
+ op: OpsLogOpSchema,
7400
+ reason: OpsLogReasonSchema,
7401
+ /** The camera the op targeted; null for a cluster/global op. */
7402
+ deviceId: number().nullable(),
7403
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7404
+ nodeId: string(),
7405
+ /** Buckets / rows deleted (op-specific unit). */
7406
+ itemsAffected: number(),
7407
+ /** Bytes reclaimed by the op (0 when not measurable). */
7408
+ bytesReclaimed: number(),
7409
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7410
+ detail: string().nullable(),
7411
+ /** Who/what triggered the op. */
7412
+ actor: string()
7413
+ });
7414
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7415
+ var OpsLogQueryInputSchema = object({
7416
+ /** Restrict to a single camera; omit for every row. */
7417
+ deviceId: number().optional(),
7418
+ /** Max rows returned, newest-first. */
7419
+ limit: number().int().min(1).max(1e3).optional()
7420
+ });
7421
+ /**
7323
7422
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7324
7423
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7325
7424
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -12569,7 +12668,11 @@ array(ZoneRuleSchema).readonly();
12569
12668
  * Extend the enum here when a new gating consumer comes online (audio
12570
12669
  * gating, alert filtering, …) — no other surface needs to change.
12571
12670
  */
12572
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12671
+ var ZoneRuleStageEnum = _enum([
12672
+ "motion",
12673
+ "detection",
12674
+ "package"
12675
+ ]);
12573
12676
  DeviceType.Camera, method(object({
12574
12677
  deviceId: number(),
12575
12678
  stage: ZoneRuleStageEnum
@@ -12582,7 +12685,8 @@ DeviceType.Camera, method(object({
12582
12685
  auth: "admin"
12583
12686
  }), object({
12584
12687
  motion: array(ZoneRuleSchema).readonly(),
12585
- detection: array(ZoneRuleSchema).readonly()
12688
+ detection: array(ZoneRuleSchema).readonly(),
12689
+ package: array(ZoneRuleSchema).readonly()
12586
12690
  });
12587
12691
  var ProviderStatusSchema = object({
12588
12692
  connected: boolean(),
@@ -15765,6 +15869,7 @@ var EventKindIconSchema = _enum([
15765
15869
  "smoke",
15766
15870
  "water",
15767
15871
  "button",
15872
+ "package",
15768
15873
  "generic"
15769
15874
  ]);
15770
15875
  var EventKindCategorySchema = _enum([
@@ -15772,7 +15877,8 @@ var EventKindCategorySchema = _enum([
15772
15877
  "audio",
15773
15878
  "detection",
15774
15879
  "sensor",
15775
- "custom"
15880
+ "custom",
15881
+ "package"
15776
15882
  ]);
15777
15883
  var EventKindDescriptorSchema = object({
15778
15884
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -16113,6 +16219,26 @@ var TrackCascadeCountsSchema = object({
16113
16219
  /** Per-track CLIP search vectors removed (best-effort). */
16114
16220
  embeddings: number().int()
16115
16221
  });
16222
+ /** Event-store footprint for one camera. */
16223
+ var EventStoreDeviceFootprintSchema = object({
16224
+ deviceId: number(),
16225
+ /** Persisted event rows (motion + object + audio) for the camera. */
16226
+ rows: number().int(),
16227
+ /** Event-owned media bytes on disk for the camera. */
16228
+ bytes: number().int()
16229
+ });
16230
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16231
+ var EventStoreFootprintSchema = object({
16232
+ totalRows: number().int(),
16233
+ totalBytes: number().int(),
16234
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16235
+ });
16236
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16237
+ var EventPruneCountsSchema = object({
16238
+ motion: number().int(),
16239
+ object: number().int(),
16240
+ audio: number().int()
16241
+ });
16116
16242
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16117
16243
  deviceId: number(),
16118
16244
  trackId: string()
@@ -16176,6 +16302,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16176
16302
  }), {
16177
16303
  kind: "mutation",
16178
16304
  auth: "admin"
16305
+ }), method(object({}), EventStoreFootprintSchema, {
16306
+ kind: "query",
16307
+ auth: "admin"
16308
+ }), method(object({
16309
+ olderThanMs: number(),
16310
+ reason: OpsLogReasonSchema.optional()
16311
+ }), EventPruneCountsSchema, {
16312
+ kind: "mutation",
16313
+ auth: "admin"
16314
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16315
+ kind: "mutation",
16316
+ auth: "admin"
16317
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16318
+ kind: "query",
16319
+ auth: "admin"
16179
16320
  }), method(object({
16180
16321
  eventId: string(),
16181
16322
  kind: MediaFileKindEnum.optional()
@@ -19422,13 +19563,131 @@ method(object({
19422
19563
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19423
19564
  kind: "mutation",
19424
19565
  auth: "admin"
19425
- }), method(object({ deviceId: number() }), object({
19566
+ }), method(object({
19567
+ deviceId: number(),
19568
+ reason: OpsLogReasonSchema.optional()
19569
+ }), object({
19426
19570
  floorMs: number().nullable(),
19427
19571
  deletedBuckets: number().int(),
19428
19572
  reclaimedBytes: number().int()
19429
19573
  }), {
19430
19574
  kind: "mutation",
19431
19575
  auth: "admin"
19576
+ }), method(object({
19577
+ deviceId: number(),
19578
+ fromMs: number().optional(),
19579
+ toMs: number().optional()
19580
+ }), object({
19581
+ deletedBuckets: number().int(),
19582
+ reclaimedBytes: number().int()
19583
+ }), {
19584
+ kind: "mutation",
19585
+ auth: "admin"
19586
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19587
+ kind: "query",
19588
+ auth: "admin"
19589
+ });
19590
+ /**
19591
+ * `recordingExport` cap — render a footage time range into a single downloadable
19592
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19593
+ * bounded lifetime with a durable history, auto-expiry, and optional
19594
+ * delete-after-download.
19595
+ *
19596
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19597
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19598
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19599
+ * input and dispatch to that single provider; the render runs on the node that
19600
+ * owns the footage (no cross-node segment transfer). Download rides the
19601
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19602
+ * SQLite); history rows survive file deletion for audit.
19603
+ */
19604
+ /** Playback-speed multiplier for the render (1 = realtime). */
19605
+ var ExportSpeedSchema = number().min(.25).max(32);
19606
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19607
+ var ExportTimelapseSchema = object({
19608
+ everyMs: number().int().positive(),
19609
+ outputFps: number().int().min(1).max(60).optional()
19610
+ });
19611
+ /**
19612
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19613
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19614
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19615
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19616
+ */
19617
+ var ExportOptionsSchema = object({
19618
+ speed: ExportSpeedSchema.optional(),
19619
+ timelapse: ExportTimelapseSchema.optional(),
19620
+ includeAudio: boolean(),
19621
+ maxLifeMs: number().int().positive(),
19622
+ deleteAfterDownload: boolean(),
19623
+ title: string().max(200).optional()
19624
+ }).superRefine((v, ctx) => {
19625
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19626
+ code: ZodIssueCode.custom,
19627
+ message: "speed and timelapse are mutually exclusive",
19628
+ path: ["timelapse"]
19629
+ });
19630
+ });
19631
+ var ExportStateSchema = _enum([
19632
+ "queued",
19633
+ "rendering",
19634
+ "ready",
19635
+ "failed",
19636
+ "expired",
19637
+ "deleted"
19638
+ ]);
19639
+ /** One export job / history row. */
19640
+ var ExportRecordSchema = object({
19641
+ id: string(),
19642
+ deviceId: number(),
19643
+ profile: string(),
19644
+ fromMs: number(),
19645
+ toMs: number(),
19646
+ options: ExportOptionsSchema,
19647
+ state: ExportStateSchema,
19648
+ /** 0–100 while rendering; null otherwise. */
19649
+ progressPct: number().nullable(),
19650
+ /** File size once ready; null before. */
19651
+ fileBytes: number().nullable(),
19652
+ expiresAt: number(),
19653
+ deleteAfterDownload: boolean(),
19654
+ /** Epoch of the first complete download; null until then. */
19655
+ downloadedAt: number().nullable(),
19656
+ createdAt: number(),
19657
+ /** User id/name that requested the export. */
19658
+ createdBy: string(),
19659
+ /** Failure reason when state is 'failed'; null otherwise. */
19660
+ error: string().nullable()
19661
+ });
19662
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19663
+ var ExportDownloadSchema = object({
19664
+ url: string(),
19665
+ endpoints: array(string())
19666
+ });
19667
+ method(object({
19668
+ deviceId: number(),
19669
+ profile: string(),
19670
+ fromMs: number(),
19671
+ toMs: number(),
19672
+ options: ExportOptionsSchema
19673
+ }), ExportRecordSchema, {
19674
+ kind: "mutation",
19675
+ auth: "protected"
19676
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19677
+ kind: "query",
19678
+ auth: "protected"
19679
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19680
+ kind: "query",
19681
+ auth: "protected"
19682
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19683
+ kind: "mutation",
19684
+ auth: "protected"
19685
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19686
+ kind: "mutation",
19687
+ auth: "protected"
19688
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19689
+ kind: "query",
19690
+ auth: "protected"
19432
19691
  });
19433
19692
  /**
19434
19693
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -22448,6 +22707,12 @@ Object.freeze({
22448
22707
  addonId: null,
22449
22708
  access: "delete"
22450
22709
  },
22710
+ "pipelineAnalytics.deleteDeviceEvents": {
22711
+ capName: "pipeline-analytics",
22712
+ capScope: "device",
22713
+ addonId: null,
22714
+ access: "delete"
22715
+ },
22451
22716
  "pipelineAnalytics.deleteTracks": {
22452
22717
  capName: "pipeline-analytics",
22453
22718
  capScope: "device",
@@ -22478,6 +22743,12 @@ Object.freeze({
22478
22743
  addonId: null,
22479
22744
  access: "view"
22480
22745
  },
22746
+ "pipelineAnalytics.getEventStoreFootprint": {
22747
+ capName: "pipeline-analytics",
22748
+ capScope: "device",
22749
+ addonId: null,
22750
+ access: "view"
22751
+ },
22481
22752
  "pipelineAnalytics.getKeyEvents": {
22482
22753
  capName: "pipeline-analytics",
22483
22754
  capScope: "device",
@@ -22520,6 +22791,12 @@ Object.freeze({
22520
22791
  addonId: null,
22521
22792
  access: "view"
22522
22793
  },
22794
+ "pipelineAnalytics.listOpsLog": {
22795
+ capName: "pipeline-analytics",
22796
+ capScope: "device",
22797
+ addonId: null,
22798
+ access: "view"
22799
+ },
22523
22800
  "pipelineAnalytics.listRecentTracks": {
22524
22801
  capName: "pipeline-analytics",
22525
22802
  capScope: "device",
@@ -22532,6 +22809,12 @@ Object.freeze({
22532
22809
  addonId: null,
22533
22810
  access: "view"
22534
22811
  },
22812
+ "pipelineAnalytics.pruneEvents": {
22813
+ capName: "pipeline-analytics",
22814
+ capScope: "device",
22815
+ addonId: null,
22816
+ access: "create"
22817
+ },
22535
22818
  "pipelineAnalytics.pruneEventsBefore": {
22536
22819
  capName: "pipeline-analytics",
22537
22820
  capScope: "device",
@@ -23294,6 +23577,12 @@ Object.freeze({
23294
23577
  addonId: null,
23295
23578
  access: "create"
23296
23579
  },
23580
+ "recording.deleteFootprint": {
23581
+ capName: "recording",
23582
+ capScope: "system",
23583
+ addonId: null,
23584
+ access: "delete"
23585
+ },
23297
23586
  "recording.getAvailability": {
23298
23587
  capName: "recording",
23299
23588
  capScope: "system",
@@ -23324,6 +23613,12 @@ Object.freeze({
23324
23613
  addonId: null,
23325
23614
  access: "view"
23326
23615
  },
23616
+ "recording.listOpsLog": {
23617
+ capName: "recording",
23618
+ capScope: "system",
23619
+ addonId: null,
23620
+ access: "view"
23621
+ },
23327
23622
  "recording.locateSegment": {
23328
23623
  capName: "recording",
23329
23624
  capScope: "system",
@@ -23354,6 +23649,42 @@ Object.freeze({
23354
23649
  addonId: null,
23355
23650
  access: "create"
23356
23651
  },
23652
+ "recordingExport.cancelExport": {
23653
+ capName: "recordingExport",
23654
+ capScope: "system",
23655
+ addonId: null,
23656
+ access: "create"
23657
+ },
23658
+ "recordingExport.createExport": {
23659
+ capName: "recordingExport",
23660
+ capScope: "system",
23661
+ addonId: null,
23662
+ access: "create"
23663
+ },
23664
+ "recordingExport.deleteExport": {
23665
+ capName: "recordingExport",
23666
+ capScope: "system",
23667
+ addonId: null,
23668
+ access: "delete"
23669
+ },
23670
+ "recordingExport.getDownloadUrl": {
23671
+ capName: "recordingExport",
23672
+ capScope: "system",
23673
+ addonId: null,
23674
+ access: "view"
23675
+ },
23676
+ "recordingExport.getExport": {
23677
+ capName: "recordingExport",
23678
+ capScope: "system",
23679
+ addonId: null,
23680
+ access: "view"
23681
+ },
23682
+ "recordingExport.listExports": {
23683
+ capName: "recordingExport",
23684
+ capScope: "system",
23685
+ addonId: null,
23686
+ access: "view"
23687
+ },
23357
23688
  "sceneMonitor.captureReference": {
23358
23689
  capName: "scene-monitor",
23359
23690
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-smtp-nodemailer",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "description": "SMTP email provider addon for CamStack — wraps `nodemailer` and registers a `smtp-provider` cap collection entry. Used by magic-link login + notifier addons.",
5
5
  "keywords": [
6
6
  "camstack",