@camstack/addon-decoder-nodeav 1.1.14 → 1.1.16

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/index.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",
@@ -7237,6 +7280,24 @@ var RecordingRetentionSchema = object({
7237
7280
  maxSizeGb: number().min(0).optional()
7238
7281
  });
7239
7282
  /**
7283
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7284
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7285
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7286
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7287
+ *
7288
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7289
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7290
+ * preset changed over time renders every historical window at the dims it was
7291
+ * written with.
7292
+ */
7293
+ var ScrubThumbnailPresetSchema = _enum([
7294
+ "minimal",
7295
+ "low",
7296
+ "standard",
7297
+ "high",
7298
+ "max"
7299
+ ]);
7300
+ /**
7240
7301
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7241
7302
  *
7242
7303
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7273,7 +7334,14 @@ var RecordingConfigSchema = object({
7273
7334
  * derived into bands once via `migrateConfigToBands`.
7274
7335
  */
7275
7336
  bands: array(RecordingBandSchema).optional(),
7276
- retention: RecordingRetentionSchema.optional()
7337
+ retention: RecordingRetentionSchema.optional(),
7338
+ /**
7339
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7340
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7341
+ * windows only — existing sheets are immutable, and each window's index
7342
+ * carries its own tile dims so mixed-preset history renders correctly.
7343
+ */
7344
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7277
7345
  });
7278
7346
  /**
7279
7347
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12525,7 +12593,11 @@ array(ZoneRuleSchema).readonly();
12525
12593
  * Extend the enum here when a new gating consumer comes online (audio
12526
12594
  * gating, alert filtering, …) — no other surface needs to change.
12527
12595
  */
12528
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12596
+ var ZoneRuleStageEnum = _enum([
12597
+ "motion",
12598
+ "detection",
12599
+ "package"
12600
+ ]);
12529
12601
  DeviceType.Camera, method(object({
12530
12602
  deviceId: number(),
12531
12603
  stage: ZoneRuleStageEnum
@@ -12538,7 +12610,8 @@ DeviceType.Camera, method(object({
12538
12610
  auth: "admin"
12539
12611
  }), object({
12540
12612
  motion: array(ZoneRuleSchema).readonly(),
12541
- detection: array(ZoneRuleSchema).readonly()
12613
+ detection: array(ZoneRuleSchema).readonly(),
12614
+ package: array(ZoneRuleSchema).readonly()
12542
12615
  });
12543
12616
  var ProviderStatusSchema = object({
12544
12617
  connected: boolean(),
@@ -15851,6 +15924,7 @@ var EventKindIconSchema = _enum([
15851
15924
  "smoke",
15852
15925
  "water",
15853
15926
  "button",
15927
+ "package",
15854
15928
  "generic"
15855
15929
  ]);
15856
15930
  var EventKindCategorySchema = _enum([
@@ -15858,7 +15932,8 @@ var EventKindCategorySchema = _enum([
15858
15932
  "audio",
15859
15933
  "detection",
15860
15934
  "sensor",
15861
- "custom"
15935
+ "custom",
15936
+ "package"
15862
15937
  ]);
15863
15938
  var EventKindDescriptorSchema = object({
15864
15939
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19504,6 +19579,108 @@ method(object({
19504
19579
  auth: "admin"
19505
19580
  });
19506
19581
  /**
19582
+ * `recordingExport` cap — render a footage time range into a single downloadable
19583
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19584
+ * bounded lifetime with a durable history, auto-expiry, and optional
19585
+ * delete-after-download.
19586
+ *
19587
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19588
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19589
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19590
+ * input and dispatch to that single provider; the render runs on the node that
19591
+ * owns the footage (no cross-node segment transfer). Download rides the
19592
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19593
+ * SQLite); history rows survive file deletion for audit.
19594
+ */
19595
+ /** Playback-speed multiplier for the render (1 = realtime). */
19596
+ var ExportSpeedSchema = number().min(.25).max(32);
19597
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19598
+ var ExportTimelapseSchema = object({
19599
+ everyMs: number().int().positive(),
19600
+ outputFps: number().int().min(1).max(60).optional()
19601
+ });
19602
+ /**
19603
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19604
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19605
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19606
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19607
+ */
19608
+ var ExportOptionsSchema = object({
19609
+ speed: ExportSpeedSchema.optional(),
19610
+ timelapse: ExportTimelapseSchema.optional(),
19611
+ includeAudio: boolean(),
19612
+ maxLifeMs: number().int().positive(),
19613
+ deleteAfterDownload: boolean(),
19614
+ title: string().max(200).optional()
19615
+ }).superRefine((v, ctx) => {
19616
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19617
+ code: ZodIssueCode.custom,
19618
+ message: "speed and timelapse are mutually exclusive",
19619
+ path: ["timelapse"]
19620
+ });
19621
+ });
19622
+ var ExportStateSchema = _enum([
19623
+ "queued",
19624
+ "rendering",
19625
+ "ready",
19626
+ "failed",
19627
+ "expired",
19628
+ "deleted"
19629
+ ]);
19630
+ /** One export job / history row. */
19631
+ var ExportRecordSchema = object({
19632
+ id: string(),
19633
+ deviceId: number(),
19634
+ profile: string(),
19635
+ fromMs: number(),
19636
+ toMs: number(),
19637
+ options: ExportOptionsSchema,
19638
+ state: ExportStateSchema,
19639
+ /** 0–100 while rendering; null otherwise. */
19640
+ progressPct: number().nullable(),
19641
+ /** File size once ready; null before. */
19642
+ fileBytes: number().nullable(),
19643
+ expiresAt: number(),
19644
+ deleteAfterDownload: boolean(),
19645
+ /** Epoch of the first complete download; null until then. */
19646
+ downloadedAt: number().nullable(),
19647
+ createdAt: number(),
19648
+ /** User id/name that requested the export. */
19649
+ createdBy: string(),
19650
+ /** Failure reason when state is 'failed'; null otherwise. */
19651
+ error: string().nullable()
19652
+ });
19653
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19654
+ var ExportDownloadSchema = object({
19655
+ url: string(),
19656
+ endpoints: array(string())
19657
+ });
19658
+ method(object({
19659
+ deviceId: number(),
19660
+ profile: string(),
19661
+ fromMs: number(),
19662
+ toMs: number(),
19663
+ options: ExportOptionsSchema
19664
+ }), ExportRecordSchema, {
19665
+ kind: "mutation",
19666
+ auth: "protected"
19667
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19668
+ kind: "query",
19669
+ auth: "protected"
19670
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19671
+ kind: "query",
19672
+ auth: "protected"
19673
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19674
+ kind: "mutation",
19675
+ auth: "protected"
19676
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19677
+ kind: "mutation",
19678
+ auth: "protected"
19679
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19680
+ kind: "query",
19681
+ auth: "protected"
19682
+ });
19683
+ /**
19507
19684
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19508
19685
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19509
19686
  * `deviceId`.
@@ -23427,6 +23604,42 @@ Object.freeze({
23427
23604
  addonId: null,
23428
23605
  access: "create"
23429
23606
  },
23607
+ "recordingExport.cancelExport": {
23608
+ capName: "recordingExport",
23609
+ capScope: "system",
23610
+ addonId: null,
23611
+ access: "create"
23612
+ },
23613
+ "recordingExport.createExport": {
23614
+ capName: "recordingExport",
23615
+ capScope: "system",
23616
+ addonId: null,
23617
+ access: "create"
23618
+ },
23619
+ "recordingExport.deleteExport": {
23620
+ capName: "recordingExport",
23621
+ capScope: "system",
23622
+ addonId: null,
23623
+ access: "delete"
23624
+ },
23625
+ "recordingExport.getDownloadUrl": {
23626
+ capName: "recordingExport",
23627
+ capScope: "system",
23628
+ addonId: null,
23629
+ access: "view"
23630
+ },
23631
+ "recordingExport.getExport": {
23632
+ capName: "recordingExport",
23633
+ capScope: "system",
23634
+ addonId: null,
23635
+ access: "view"
23636
+ },
23637
+ "recordingExport.listExports": {
23638
+ capName: "recordingExport",
23639
+ capScope: "system",
23640
+ addonId: null,
23641
+ access: "view"
23642
+ },
23430
23643
  "sceneMonitor.captureReference": {
23431
23644
  capName: "scene-monitor",
23432
23645
  capScope: "device",
package/dist/index.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",
@@ -7233,6 +7276,24 @@ var RecordingRetentionSchema = object({
7233
7276
  maxSizeGb: number().min(0).optional()
7234
7277
  });
7235
7278
  /**
7279
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7280
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7281
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7282
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7283
+ *
7284
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7285
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7286
+ * preset changed over time renders every historical window at the dims it was
7287
+ * written with.
7288
+ */
7289
+ var ScrubThumbnailPresetSchema = _enum([
7290
+ "minimal",
7291
+ "low",
7292
+ "standard",
7293
+ "high",
7294
+ "max"
7295
+ ]);
7296
+ /**
7236
7297
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7237
7298
  *
7238
7299
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7269,7 +7330,14 @@ var RecordingConfigSchema = object({
7269
7330
  * derived into bands once via `migrateConfigToBands`.
7270
7331
  */
7271
7332
  bands: array(RecordingBandSchema).optional(),
7272
- retention: RecordingRetentionSchema.optional()
7333
+ retention: RecordingRetentionSchema.optional(),
7334
+ /**
7335
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7336
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7337
+ * windows only — existing sheets are immutable, and each window's index
7338
+ * carries its own tile dims so mixed-preset history renders correctly.
7339
+ */
7340
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7273
7341
  });
7274
7342
  /**
7275
7343
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12521,7 +12589,11 @@ array(ZoneRuleSchema).readonly();
12521
12589
  * Extend the enum here when a new gating consumer comes online (audio
12522
12590
  * gating, alert filtering, …) — no other surface needs to change.
12523
12591
  */
12524
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12592
+ var ZoneRuleStageEnum = _enum([
12593
+ "motion",
12594
+ "detection",
12595
+ "package"
12596
+ ]);
12525
12597
  DeviceType.Camera, method(object({
12526
12598
  deviceId: number(),
12527
12599
  stage: ZoneRuleStageEnum
@@ -12534,7 +12606,8 @@ DeviceType.Camera, method(object({
12534
12606
  auth: "admin"
12535
12607
  }), object({
12536
12608
  motion: array(ZoneRuleSchema).readonly(),
12537
- detection: array(ZoneRuleSchema).readonly()
12609
+ detection: array(ZoneRuleSchema).readonly(),
12610
+ package: array(ZoneRuleSchema).readonly()
12538
12611
  });
12539
12612
  var ProviderStatusSchema = object({
12540
12613
  connected: boolean(),
@@ -15847,6 +15920,7 @@ var EventKindIconSchema = _enum([
15847
15920
  "smoke",
15848
15921
  "water",
15849
15922
  "button",
15923
+ "package",
15850
15924
  "generic"
15851
15925
  ]);
15852
15926
  var EventKindCategorySchema = _enum([
@@ -15854,7 +15928,8 @@ var EventKindCategorySchema = _enum([
15854
15928
  "audio",
15855
15929
  "detection",
15856
15930
  "sensor",
15857
- "custom"
15931
+ "custom",
15932
+ "package"
15858
15933
  ]);
15859
15934
  var EventKindDescriptorSchema = object({
15860
15935
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19500,6 +19575,108 @@ method(object({
19500
19575
  auth: "admin"
19501
19576
  });
19502
19577
  /**
19578
+ * `recordingExport` cap — render a footage time range into a single downloadable
19579
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19580
+ * bounded lifetime with a durable history, auto-expiry, and optional
19581
+ * delete-after-download.
19582
+ *
19583
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19584
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19585
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19586
+ * input and dispatch to that single provider; the render runs on the node that
19587
+ * owns the footage (no cross-node segment transfer). Download rides the
19588
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19589
+ * SQLite); history rows survive file deletion for audit.
19590
+ */
19591
+ /** Playback-speed multiplier for the render (1 = realtime). */
19592
+ var ExportSpeedSchema = number().min(.25).max(32);
19593
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19594
+ var ExportTimelapseSchema = object({
19595
+ everyMs: number().int().positive(),
19596
+ outputFps: number().int().min(1).max(60).optional()
19597
+ });
19598
+ /**
19599
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19600
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19601
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19602
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19603
+ */
19604
+ var ExportOptionsSchema = object({
19605
+ speed: ExportSpeedSchema.optional(),
19606
+ timelapse: ExportTimelapseSchema.optional(),
19607
+ includeAudio: boolean(),
19608
+ maxLifeMs: number().int().positive(),
19609
+ deleteAfterDownload: boolean(),
19610
+ title: string().max(200).optional()
19611
+ }).superRefine((v, ctx) => {
19612
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19613
+ code: ZodIssueCode.custom,
19614
+ message: "speed and timelapse are mutually exclusive",
19615
+ path: ["timelapse"]
19616
+ });
19617
+ });
19618
+ var ExportStateSchema = _enum([
19619
+ "queued",
19620
+ "rendering",
19621
+ "ready",
19622
+ "failed",
19623
+ "expired",
19624
+ "deleted"
19625
+ ]);
19626
+ /** One export job / history row. */
19627
+ var ExportRecordSchema = object({
19628
+ id: string(),
19629
+ deviceId: number(),
19630
+ profile: string(),
19631
+ fromMs: number(),
19632
+ toMs: number(),
19633
+ options: ExportOptionsSchema,
19634
+ state: ExportStateSchema,
19635
+ /** 0–100 while rendering; null otherwise. */
19636
+ progressPct: number().nullable(),
19637
+ /** File size once ready; null before. */
19638
+ fileBytes: number().nullable(),
19639
+ expiresAt: number(),
19640
+ deleteAfterDownload: boolean(),
19641
+ /** Epoch of the first complete download; null until then. */
19642
+ downloadedAt: number().nullable(),
19643
+ createdAt: number(),
19644
+ /** User id/name that requested the export. */
19645
+ createdBy: string(),
19646
+ /** Failure reason when state is 'failed'; null otherwise. */
19647
+ error: string().nullable()
19648
+ });
19649
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19650
+ var ExportDownloadSchema = object({
19651
+ url: string(),
19652
+ endpoints: array(string())
19653
+ });
19654
+ method(object({
19655
+ deviceId: number(),
19656
+ profile: string(),
19657
+ fromMs: number(),
19658
+ toMs: number(),
19659
+ options: ExportOptionsSchema
19660
+ }), ExportRecordSchema, {
19661
+ kind: "mutation",
19662
+ auth: "protected"
19663
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19664
+ kind: "query",
19665
+ auth: "protected"
19666
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19667
+ kind: "query",
19668
+ auth: "protected"
19669
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19670
+ kind: "mutation",
19671
+ auth: "protected"
19672
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19673
+ kind: "mutation",
19674
+ auth: "protected"
19675
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19676
+ kind: "query",
19677
+ auth: "protected"
19678
+ });
19679
+ /**
19503
19680
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19504
19681
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19505
19682
  * `deviceId`.
@@ -23423,6 +23600,42 @@ Object.freeze({
23423
23600
  addonId: null,
23424
23601
  access: "create"
23425
23602
  },
23603
+ "recordingExport.cancelExport": {
23604
+ capName: "recordingExport",
23605
+ capScope: "system",
23606
+ addonId: null,
23607
+ access: "create"
23608
+ },
23609
+ "recordingExport.createExport": {
23610
+ capName: "recordingExport",
23611
+ capScope: "system",
23612
+ addonId: null,
23613
+ access: "create"
23614
+ },
23615
+ "recordingExport.deleteExport": {
23616
+ capName: "recordingExport",
23617
+ capScope: "system",
23618
+ addonId: null,
23619
+ access: "delete"
23620
+ },
23621
+ "recordingExport.getDownloadUrl": {
23622
+ capName: "recordingExport",
23623
+ capScope: "system",
23624
+ addonId: null,
23625
+ access: "view"
23626
+ },
23627
+ "recordingExport.getExport": {
23628
+ capName: "recordingExport",
23629
+ capScope: "system",
23630
+ addonId: null,
23631
+ access: "view"
23632
+ },
23633
+ "recordingExport.listExports": {
23634
+ capName: "recordingExport",
23635
+ capScope: "system",
23636
+ addonId: null,
23637
+ access: "view"
23638
+ },
23426
23639
  "sceneMonitor.captureReference": {
23427
23640
  capName: "scene-monitor",
23428
23641
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",