@camstack/addon-advanced-notifier 1.1.26 → 1.1.28

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
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let node_crypto = require("node:crypto");
6
- //#region ../types/dist/event-category-H4AVePnn.mjs
6
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -156,6 +156,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
156
156
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
157
157
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
158
158
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
159
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
160
+ * progress bar the client reconciles via `recordingExport.getExport`. */
161
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
162
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
163
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
159
164
  EventCategory["DetectionEvent"] = "detection.event";
160
165
  EventCategory["SessionTrackNew"] = "session.track.new";
161
166
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -445,6 +450,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
445
450
  */
446
451
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
447
452
  /**
453
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
454
+ * a package zone — a newly-appeared stationary object of a package class
455
+ * that cleared the class / zone / dwell / size gates. Payload:
456
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
457
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
458
+ * Telemetry (D8): the durable record is the `package-events` store row;
459
+ * this bus topic drives notifier rules + live UI. See
460
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
461
+ */
462
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
463
+ /**
464
+ * Fired by `addon-post-analysis` when a previously-delivered package
465
+ * leaves its zone (the stationary entry departed — moved or swept).
466
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
467
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
468
+ * Telemetry (D8). See package-zones-design §5.2.
469
+ */
470
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
471
+ /**
448
472
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
449
473
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
450
474
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5183,6 +5207,25 @@ function _instanceof(cls, params = {}) {
5183
5207
  };
5184
5208
  return inst;
5185
5209
  }
5210
+ //#endregion
5211
+ //#region ../../node_modules/zod/v4/classic/compat.js
5212
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5213
+ var ZodIssueCode = {
5214
+ invalid_type: "invalid_type",
5215
+ too_big: "too_big",
5216
+ too_small: "too_small",
5217
+ invalid_format: "invalid_format",
5218
+ not_multiple_of: "not_multiple_of",
5219
+ unrecognized_keys: "unrecognized_keys",
5220
+ invalid_union: "invalid_union",
5221
+ invalid_key: "invalid_key",
5222
+ invalid_element: "invalid_element",
5223
+ invalid_value: "invalid_value",
5224
+ custom: "custom"
5225
+ };
5226
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5227
+ var ZodFirstPartyTypeKind;
5228
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5186
5229
  Object.fromEntries([
5187
5230
  {
5188
5231
  id: "overview",
@@ -7225,6 +7268,24 @@ var RecordingRetentionSchema = object({
7225
7268
  maxSizeGb: number().min(0).optional()
7226
7269
  });
7227
7270
  /**
7271
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7272
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7273
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7274
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7275
+ *
7276
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7277
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7278
+ * preset changed over time renders every historical window at the dims it was
7279
+ * written with.
7280
+ */
7281
+ var ScrubThumbnailPresetSchema = _enum([
7282
+ "minimal",
7283
+ "low",
7284
+ "standard",
7285
+ "high",
7286
+ "max"
7287
+ ]);
7288
+ /**
7228
7289
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7229
7290
  *
7230
7291
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7261,7 +7322,14 @@ var RecordingConfigSchema = object({
7261
7322
  * derived into bands once via `migrateConfigToBands`.
7262
7323
  */
7263
7324
  bands: array(RecordingBandSchema).optional(),
7264
- retention: RecordingRetentionSchema.optional()
7325
+ retention: RecordingRetentionSchema.optional(),
7326
+ /**
7327
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7328
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7329
+ * windows only — existing sheets are immutable, and each window's index
7330
+ * carries its own tile dims so mixed-preset history renders correctly.
7331
+ */
7332
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7265
7333
  });
7266
7334
  /**
7267
7335
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12527,7 +12595,11 @@ array(ZoneRuleSchema).readonly();
12527
12595
  * Extend the enum here when a new gating consumer comes online (audio
12528
12596
  * gating, alert filtering, …) — no other surface needs to change.
12529
12597
  */
12530
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12598
+ var ZoneRuleStageEnum = _enum([
12599
+ "motion",
12600
+ "detection",
12601
+ "package"
12602
+ ]);
12531
12603
  DeviceType.Camera, method(object({
12532
12604
  deviceId: number(),
12533
12605
  stage: ZoneRuleStageEnum
@@ -12540,7 +12612,8 @@ DeviceType.Camera, method(object({
12540
12612
  auth: "admin"
12541
12613
  }), object({
12542
12614
  motion: array(ZoneRuleSchema).readonly(),
12543
- detection: array(ZoneRuleSchema).readonly()
12615
+ detection: array(ZoneRuleSchema).readonly(),
12616
+ package: array(ZoneRuleSchema).readonly()
12544
12617
  });
12545
12618
  var ProviderStatusSchema = object({
12546
12619
  connected: boolean(),
@@ -15749,6 +15822,7 @@ var EventKindIconSchema = _enum([
15749
15822
  "smoke",
15750
15823
  "water",
15751
15824
  "button",
15825
+ "package",
15752
15826
  "generic"
15753
15827
  ]);
15754
15828
  var EventKindCategorySchema = _enum([
@@ -15756,7 +15830,8 @@ var EventKindCategorySchema = _enum([
15756
15830
  "audio",
15757
15831
  "detection",
15758
15832
  "sensor",
15759
- "custom"
15833
+ "custom",
15834
+ "package"
15760
15835
  ]);
15761
15836
  var EventKindDescriptorSchema = object({
15762
15837
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19402,6 +19477,108 @@ method(object({
19402
19477
  auth: "admin"
19403
19478
  });
19404
19479
  /**
19480
+ * `recordingExport` cap — render a footage time range into a single downloadable
19481
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19482
+ * bounded lifetime with a durable history, auto-expiry, and optional
19483
+ * delete-after-download.
19484
+ *
19485
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19486
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19487
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19488
+ * input and dispatch to that single provider; the render runs on the node that
19489
+ * owns the footage (no cross-node segment transfer). Download rides the
19490
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19491
+ * SQLite); history rows survive file deletion for audit.
19492
+ */
19493
+ /** Playback-speed multiplier for the render (1 = realtime). */
19494
+ var ExportSpeedSchema = number().min(.25).max(32);
19495
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19496
+ var ExportTimelapseSchema = object({
19497
+ everyMs: number().int().positive(),
19498
+ outputFps: number().int().min(1).max(60).optional()
19499
+ });
19500
+ /**
19501
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19502
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19503
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19504
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19505
+ */
19506
+ var ExportOptionsSchema = object({
19507
+ speed: ExportSpeedSchema.optional(),
19508
+ timelapse: ExportTimelapseSchema.optional(),
19509
+ includeAudio: boolean(),
19510
+ maxLifeMs: number().int().positive(),
19511
+ deleteAfterDownload: boolean(),
19512
+ title: string().max(200).optional()
19513
+ }).superRefine((v, ctx) => {
19514
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19515
+ code: ZodIssueCode.custom,
19516
+ message: "speed and timelapse are mutually exclusive",
19517
+ path: ["timelapse"]
19518
+ });
19519
+ });
19520
+ var ExportStateSchema = _enum([
19521
+ "queued",
19522
+ "rendering",
19523
+ "ready",
19524
+ "failed",
19525
+ "expired",
19526
+ "deleted"
19527
+ ]);
19528
+ /** One export job / history row. */
19529
+ var ExportRecordSchema = object({
19530
+ id: string(),
19531
+ deviceId: number(),
19532
+ profile: string(),
19533
+ fromMs: number(),
19534
+ toMs: number(),
19535
+ options: ExportOptionsSchema,
19536
+ state: ExportStateSchema,
19537
+ /** 0–100 while rendering; null otherwise. */
19538
+ progressPct: number().nullable(),
19539
+ /** File size once ready; null before. */
19540
+ fileBytes: number().nullable(),
19541
+ expiresAt: number(),
19542
+ deleteAfterDownload: boolean(),
19543
+ /** Epoch of the first complete download; null until then. */
19544
+ downloadedAt: number().nullable(),
19545
+ createdAt: number(),
19546
+ /** User id/name that requested the export. */
19547
+ createdBy: string(),
19548
+ /** Failure reason when state is 'failed'; null otherwise. */
19549
+ error: string().nullable()
19550
+ });
19551
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19552
+ var ExportDownloadSchema = object({
19553
+ url: string(),
19554
+ endpoints: array(string())
19555
+ });
19556
+ method(object({
19557
+ deviceId: number(),
19558
+ profile: string(),
19559
+ fromMs: number(),
19560
+ toMs: number(),
19561
+ options: ExportOptionsSchema
19562
+ }), ExportRecordSchema, {
19563
+ kind: "mutation",
19564
+ auth: "protected"
19565
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19566
+ kind: "query",
19567
+ auth: "protected"
19568
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19569
+ kind: "query",
19570
+ auth: "protected"
19571
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19572
+ kind: "mutation",
19573
+ auth: "protected"
19574
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19575
+ kind: "mutation",
19576
+ auth: "protected"
19577
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19578
+ kind: "query",
19579
+ auth: "protected"
19580
+ });
19581
+ /**
19405
19582
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19406
19583
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19407
19584
  * `deviceId`.
@@ -23325,6 +23502,42 @@ Object.freeze({
23325
23502
  addonId: null,
23326
23503
  access: "create"
23327
23504
  },
23505
+ "recordingExport.cancelExport": {
23506
+ capName: "recordingExport",
23507
+ capScope: "system",
23508
+ addonId: null,
23509
+ access: "create"
23510
+ },
23511
+ "recordingExport.createExport": {
23512
+ capName: "recordingExport",
23513
+ capScope: "system",
23514
+ addonId: null,
23515
+ access: "create"
23516
+ },
23517
+ "recordingExport.deleteExport": {
23518
+ capName: "recordingExport",
23519
+ capScope: "system",
23520
+ addonId: null,
23521
+ access: "delete"
23522
+ },
23523
+ "recordingExport.getDownloadUrl": {
23524
+ capName: "recordingExport",
23525
+ capScope: "system",
23526
+ addonId: null,
23527
+ access: "view"
23528
+ },
23529
+ "recordingExport.getExport": {
23530
+ capName: "recordingExport",
23531
+ capScope: "system",
23532
+ addonId: null,
23533
+ access: "view"
23534
+ },
23535
+ "recordingExport.listExports": {
23536
+ capName: "recordingExport",
23537
+ capScope: "system",
23538
+ addonId: null,
23539
+ access: "view"
23540
+ },
23328
23541
  "sceneMonitor.captureReference": {
23329
23542
  capName: "scene-monitor",
23330
23543
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- //#region ../types/dist/event-category-H4AVePnn.mjs
2
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -152,6 +152,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
152
152
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
153
153
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
154
154
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
155
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
156
+ * progress bar the client reconciles via `recordingExport.getExport`. */
157
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
158
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
159
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
155
160
  EventCategory["DetectionEvent"] = "detection.event";
156
161
  EventCategory["SessionTrackNew"] = "session.track.new";
157
162
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -441,6 +446,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
441
446
  */
442
447
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
443
448
  /**
449
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
450
+ * a package zone — a newly-appeared stationary object of a package class
451
+ * that cleared the class / zone / dwell / size gates. Payload:
452
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
453
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
454
+ * Telemetry (D8): the durable record is the `package-events` store row;
455
+ * this bus topic drives notifier rules + live UI. See
456
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
457
+ */
458
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
459
+ /**
460
+ * Fired by `addon-post-analysis` when a previously-delivered package
461
+ * leaves its zone (the stationary entry departed — moved or swept).
462
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
463
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
464
+ * Telemetry (D8). See package-zones-design §5.2.
465
+ */
466
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
467
+ /**
444
468
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
445
469
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
446
470
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5179,6 +5203,25 @@ function _instanceof(cls, params = {}) {
5179
5203
  };
5180
5204
  return inst;
5181
5205
  }
5206
+ //#endregion
5207
+ //#region ../../node_modules/zod/v4/classic/compat.js
5208
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5209
+ var ZodIssueCode = {
5210
+ invalid_type: "invalid_type",
5211
+ too_big: "too_big",
5212
+ too_small: "too_small",
5213
+ invalid_format: "invalid_format",
5214
+ not_multiple_of: "not_multiple_of",
5215
+ unrecognized_keys: "unrecognized_keys",
5216
+ invalid_union: "invalid_union",
5217
+ invalid_key: "invalid_key",
5218
+ invalid_element: "invalid_element",
5219
+ invalid_value: "invalid_value",
5220
+ custom: "custom"
5221
+ };
5222
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5223
+ var ZodFirstPartyTypeKind;
5224
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5182
5225
  Object.fromEntries([
5183
5226
  {
5184
5227
  id: "overview",
@@ -7221,6 +7264,24 @@ var RecordingRetentionSchema = object({
7221
7264
  maxSizeGb: number().min(0).optional()
7222
7265
  });
7223
7266
  /**
7267
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7268
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7269
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7270
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7271
+ *
7272
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7273
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7274
+ * preset changed over time renders every historical window at the dims it was
7275
+ * written with.
7276
+ */
7277
+ var ScrubThumbnailPresetSchema = _enum([
7278
+ "minimal",
7279
+ "low",
7280
+ "standard",
7281
+ "high",
7282
+ "max"
7283
+ ]);
7284
+ /**
7224
7285
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7225
7286
  *
7226
7287
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7257,7 +7318,14 @@ var RecordingConfigSchema = object({
7257
7318
  * derived into bands once via `migrateConfigToBands`.
7258
7319
  */
7259
7320
  bands: array(RecordingBandSchema).optional(),
7260
- retention: RecordingRetentionSchema.optional()
7321
+ retention: RecordingRetentionSchema.optional(),
7322
+ /**
7323
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7324
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7325
+ * windows only — existing sheets are immutable, and each window's index
7326
+ * carries its own tile dims so mixed-preset history renders correctly.
7327
+ */
7328
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7261
7329
  });
7262
7330
  /**
7263
7331
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12523,7 +12591,11 @@ array(ZoneRuleSchema).readonly();
12523
12591
  * Extend the enum here when a new gating consumer comes online (audio
12524
12592
  * gating, alert filtering, …) — no other surface needs to change.
12525
12593
  */
12526
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12594
+ var ZoneRuleStageEnum = _enum([
12595
+ "motion",
12596
+ "detection",
12597
+ "package"
12598
+ ]);
12527
12599
  DeviceType.Camera, method(object({
12528
12600
  deviceId: number(),
12529
12601
  stage: ZoneRuleStageEnum
@@ -12536,7 +12608,8 @@ DeviceType.Camera, method(object({
12536
12608
  auth: "admin"
12537
12609
  }), object({
12538
12610
  motion: array(ZoneRuleSchema).readonly(),
12539
- detection: array(ZoneRuleSchema).readonly()
12611
+ detection: array(ZoneRuleSchema).readonly(),
12612
+ package: array(ZoneRuleSchema).readonly()
12540
12613
  });
12541
12614
  var ProviderStatusSchema = object({
12542
12615
  connected: boolean(),
@@ -15745,6 +15818,7 @@ var EventKindIconSchema = _enum([
15745
15818
  "smoke",
15746
15819
  "water",
15747
15820
  "button",
15821
+ "package",
15748
15822
  "generic"
15749
15823
  ]);
15750
15824
  var EventKindCategorySchema = _enum([
@@ -15752,7 +15826,8 @@ var EventKindCategorySchema = _enum([
15752
15826
  "audio",
15753
15827
  "detection",
15754
15828
  "sensor",
15755
- "custom"
15829
+ "custom",
15830
+ "package"
15756
15831
  ]);
15757
15832
  var EventKindDescriptorSchema = object({
15758
15833
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19398,6 +19473,108 @@ method(object({
19398
19473
  auth: "admin"
19399
19474
  });
19400
19475
  /**
19476
+ * `recordingExport` cap — render a footage time range into a single downloadable
19477
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19478
+ * bounded lifetime with a durable history, auto-expiry, and optional
19479
+ * delete-after-download.
19480
+ *
19481
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19482
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19483
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19484
+ * input and dispatch to that single provider; the render runs on the node that
19485
+ * owns the footage (no cross-node segment transfer). Download rides the
19486
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19487
+ * SQLite); history rows survive file deletion for audit.
19488
+ */
19489
+ /** Playback-speed multiplier for the render (1 = realtime). */
19490
+ var ExportSpeedSchema = number().min(.25).max(32);
19491
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19492
+ var ExportTimelapseSchema = object({
19493
+ everyMs: number().int().positive(),
19494
+ outputFps: number().int().min(1).max(60).optional()
19495
+ });
19496
+ /**
19497
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19498
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19499
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19500
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19501
+ */
19502
+ var ExportOptionsSchema = object({
19503
+ speed: ExportSpeedSchema.optional(),
19504
+ timelapse: ExportTimelapseSchema.optional(),
19505
+ includeAudio: boolean(),
19506
+ maxLifeMs: number().int().positive(),
19507
+ deleteAfterDownload: boolean(),
19508
+ title: string().max(200).optional()
19509
+ }).superRefine((v, ctx) => {
19510
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19511
+ code: ZodIssueCode.custom,
19512
+ message: "speed and timelapse are mutually exclusive",
19513
+ path: ["timelapse"]
19514
+ });
19515
+ });
19516
+ var ExportStateSchema = _enum([
19517
+ "queued",
19518
+ "rendering",
19519
+ "ready",
19520
+ "failed",
19521
+ "expired",
19522
+ "deleted"
19523
+ ]);
19524
+ /** One export job / history row. */
19525
+ var ExportRecordSchema = object({
19526
+ id: string(),
19527
+ deviceId: number(),
19528
+ profile: string(),
19529
+ fromMs: number(),
19530
+ toMs: number(),
19531
+ options: ExportOptionsSchema,
19532
+ state: ExportStateSchema,
19533
+ /** 0–100 while rendering; null otherwise. */
19534
+ progressPct: number().nullable(),
19535
+ /** File size once ready; null before. */
19536
+ fileBytes: number().nullable(),
19537
+ expiresAt: number(),
19538
+ deleteAfterDownload: boolean(),
19539
+ /** Epoch of the first complete download; null until then. */
19540
+ downloadedAt: number().nullable(),
19541
+ createdAt: number(),
19542
+ /** User id/name that requested the export. */
19543
+ createdBy: string(),
19544
+ /** Failure reason when state is 'failed'; null otherwise. */
19545
+ error: string().nullable()
19546
+ });
19547
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19548
+ var ExportDownloadSchema = object({
19549
+ url: string(),
19550
+ endpoints: array(string())
19551
+ });
19552
+ method(object({
19553
+ deviceId: number(),
19554
+ profile: string(),
19555
+ fromMs: number(),
19556
+ toMs: number(),
19557
+ options: ExportOptionsSchema
19558
+ }), ExportRecordSchema, {
19559
+ kind: "mutation",
19560
+ auth: "protected"
19561
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19562
+ kind: "query",
19563
+ auth: "protected"
19564
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19565
+ kind: "query",
19566
+ auth: "protected"
19567
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19568
+ kind: "mutation",
19569
+ auth: "protected"
19570
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19571
+ kind: "mutation",
19572
+ auth: "protected"
19573
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19574
+ kind: "query",
19575
+ auth: "protected"
19576
+ });
19577
+ /**
19401
19578
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19402
19579
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19403
19580
  * `deviceId`.
@@ -23321,6 +23498,42 @@ Object.freeze({
23321
23498
  addonId: null,
23322
23499
  access: "create"
23323
23500
  },
23501
+ "recordingExport.cancelExport": {
23502
+ capName: "recordingExport",
23503
+ capScope: "system",
23504
+ addonId: null,
23505
+ access: "create"
23506
+ },
23507
+ "recordingExport.createExport": {
23508
+ capName: "recordingExport",
23509
+ capScope: "system",
23510
+ addonId: null,
23511
+ access: "create"
23512
+ },
23513
+ "recordingExport.deleteExport": {
23514
+ capName: "recordingExport",
23515
+ capScope: "system",
23516
+ addonId: null,
23517
+ access: "delete"
23518
+ },
23519
+ "recordingExport.getDownloadUrl": {
23520
+ capName: "recordingExport",
23521
+ capScope: "system",
23522
+ addonId: null,
23523
+ access: "view"
23524
+ },
23525
+ "recordingExport.getExport": {
23526
+ capName: "recordingExport",
23527
+ capScope: "system",
23528
+ addonId: null,
23529
+ access: "view"
23530
+ },
23531
+ "recordingExport.listExports": {
23532
+ capName: "recordingExport",
23533
+ capScope: "system",
23534
+ addonId: null,
23535
+ access: "view"
23536
+ },
23324
23537
  "sceneMonitor.captureReference": {
23325
23538
  capName: "scene-monitor",
23326
23539
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",