@camstack/addon-remote-storage 1.1.25 → 1.1.27

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/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BuH7csTY.js");
5
+ const require_shared = require("./shared-ChSRaxCw.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-fXbGPtd5.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BuH7csTY.js");
5
+ const require_shared = require("./shared-ChSRaxCw.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-fXbGPtd5.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  let node_path = require("node:path");
24
24
  node_path = __toESM(node_path);
25
25
  let node_crypto = require("node:crypto");
26
- //#region ../types/dist/event-category-H4AVePnn.mjs
26
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -176,6 +176,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
176
176
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
177
177
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
178
178
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
179
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
180
+ * progress bar the client reconciles via `recordingExport.getExport`. */
181
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
182
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
183
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
179
184
  EventCategory["DetectionEvent"] = "detection.event";
180
185
  EventCategory["SessionTrackNew"] = "session.track.new";
181
186
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -465,6 +470,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
465
470
  */
466
471
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
467
472
  /**
473
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
474
+ * a package zone — a newly-appeared stationary object of a package class
475
+ * that cleared the class / zone / dwell / size gates. Payload:
476
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
477
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
478
+ * Telemetry (D8): the durable record is the `package-events` store row;
479
+ * this bus topic drives notifier rules + live UI. See
480
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
481
+ */
482
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
483
+ /**
484
+ * Fired by `addon-post-analysis` when a previously-delivered package
485
+ * leaves its zone (the stationary entry departed — moved or swept).
486
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
487
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
488
+ * Telemetry (D8). See package-zones-design §5.2.
489
+ */
490
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
491
+ /**
468
492
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
469
493
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
470
494
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5203,6 +5227,25 @@ function _instanceof(cls, params = {}) {
5203
5227
  };
5204
5228
  return inst;
5205
5229
  }
5230
+ //#endregion
5231
+ //#region ../../node_modules/zod/v4/classic/compat.js
5232
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5233
+ var ZodIssueCode = {
5234
+ invalid_type: "invalid_type",
5235
+ too_big: "too_big",
5236
+ too_small: "too_small",
5237
+ invalid_format: "invalid_format",
5238
+ not_multiple_of: "not_multiple_of",
5239
+ unrecognized_keys: "unrecognized_keys",
5240
+ invalid_union: "invalid_union",
5241
+ invalid_key: "invalid_key",
5242
+ invalid_element: "invalid_element",
5243
+ invalid_value: "invalid_value",
5244
+ custom: "custom"
5245
+ };
5246
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5247
+ var ZodFirstPartyTypeKind;
5248
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5206
5249
  Object.fromEntries([
5207
5250
  {
5208
5251
  id: "overview",
@@ -7245,6 +7288,24 @@ var RecordingRetentionSchema = object({
7245
7288
  maxSizeGb: number().min(0).optional()
7246
7289
  });
7247
7290
  /**
7291
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7292
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7293
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7294
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7295
+ *
7296
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7297
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7298
+ * preset changed over time renders every historical window at the dims it was
7299
+ * written with.
7300
+ */
7301
+ var ScrubThumbnailPresetSchema = _enum([
7302
+ "minimal",
7303
+ "low",
7304
+ "standard",
7305
+ "high",
7306
+ "max"
7307
+ ]);
7308
+ /**
7248
7309
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7249
7310
  *
7250
7311
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7281,7 +7342,14 @@ var RecordingConfigSchema = object({
7281
7342
  * derived into bands once via `migrateConfigToBands`.
7282
7343
  */
7283
7344
  bands: array(RecordingBandSchema).optional(),
7284
- retention: RecordingRetentionSchema.optional()
7345
+ retention: RecordingRetentionSchema.optional(),
7346
+ /**
7347
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7348
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7349
+ * windows only — existing sheets are immutable, and each window's index
7350
+ * carries its own tile dims so mixed-preset history renders correctly.
7351
+ */
7352
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7285
7353
  });
7286
7354
  /**
7287
7355
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12533,7 +12601,11 @@ array(ZoneRuleSchema).readonly();
12533
12601
  * Extend the enum here when a new gating consumer comes online (audio
12534
12602
  * gating, alert filtering, …) — no other surface needs to change.
12535
12603
  */
12536
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12604
+ var ZoneRuleStageEnum = _enum([
12605
+ "motion",
12606
+ "detection",
12607
+ "package"
12608
+ ]);
12537
12609
  DeviceType.Camera, method(object({
12538
12610
  deviceId: number(),
12539
12611
  stage: ZoneRuleStageEnum
@@ -12546,7 +12618,8 @@ DeviceType.Camera, method(object({
12546
12618
  auth: "admin"
12547
12619
  }), object({
12548
12620
  motion: array(ZoneRuleSchema).readonly(),
12549
- detection: array(ZoneRuleSchema).readonly()
12621
+ detection: array(ZoneRuleSchema).readonly(),
12622
+ package: array(ZoneRuleSchema).readonly()
12550
12623
  });
12551
12624
  var ProviderStatusSchema = object({
12552
12625
  connected: boolean(),
@@ -15729,6 +15802,7 @@ var EventKindIconSchema = _enum([
15729
15802
  "smoke",
15730
15803
  "water",
15731
15804
  "button",
15805
+ "package",
15732
15806
  "generic"
15733
15807
  ]);
15734
15808
  var EventKindCategorySchema = _enum([
@@ -15736,7 +15810,8 @@ var EventKindCategorySchema = _enum([
15736
15810
  "audio",
15737
15811
  "detection",
15738
15812
  "sensor",
15739
- "custom"
15813
+ "custom",
15814
+ "package"
15740
15815
  ]);
15741
15816
  var EventKindDescriptorSchema = object({
15742
15817
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19427,6 +19502,108 @@ method(object({
19427
19502
  auth: "admin"
19428
19503
  });
19429
19504
  /**
19505
+ * `recordingExport` cap — render a footage time range into a single downloadable
19506
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19507
+ * bounded lifetime with a durable history, auto-expiry, and optional
19508
+ * delete-after-download.
19509
+ *
19510
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19511
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19512
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19513
+ * input and dispatch to that single provider; the render runs on the node that
19514
+ * owns the footage (no cross-node segment transfer). Download rides the
19515
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19516
+ * SQLite); history rows survive file deletion for audit.
19517
+ */
19518
+ /** Playback-speed multiplier for the render (1 = realtime). */
19519
+ var ExportSpeedSchema = number().min(.25).max(32);
19520
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19521
+ var ExportTimelapseSchema = object({
19522
+ everyMs: number().int().positive(),
19523
+ outputFps: number().int().min(1).max(60).optional()
19524
+ });
19525
+ /**
19526
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19527
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19528
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19529
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19530
+ */
19531
+ var ExportOptionsSchema = object({
19532
+ speed: ExportSpeedSchema.optional(),
19533
+ timelapse: ExportTimelapseSchema.optional(),
19534
+ includeAudio: boolean(),
19535
+ maxLifeMs: number().int().positive(),
19536
+ deleteAfterDownload: boolean(),
19537
+ title: string().max(200).optional()
19538
+ }).superRefine((v, ctx) => {
19539
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19540
+ code: ZodIssueCode.custom,
19541
+ message: "speed and timelapse are mutually exclusive",
19542
+ path: ["timelapse"]
19543
+ });
19544
+ });
19545
+ var ExportStateSchema = _enum([
19546
+ "queued",
19547
+ "rendering",
19548
+ "ready",
19549
+ "failed",
19550
+ "expired",
19551
+ "deleted"
19552
+ ]);
19553
+ /** One export job / history row. */
19554
+ var ExportRecordSchema = object({
19555
+ id: string(),
19556
+ deviceId: number(),
19557
+ profile: string(),
19558
+ fromMs: number(),
19559
+ toMs: number(),
19560
+ options: ExportOptionsSchema,
19561
+ state: ExportStateSchema,
19562
+ /** 0–100 while rendering; null otherwise. */
19563
+ progressPct: number().nullable(),
19564
+ /** File size once ready; null before. */
19565
+ fileBytes: number().nullable(),
19566
+ expiresAt: number(),
19567
+ deleteAfterDownload: boolean(),
19568
+ /** Epoch of the first complete download; null until then. */
19569
+ downloadedAt: number().nullable(),
19570
+ createdAt: number(),
19571
+ /** User id/name that requested the export. */
19572
+ createdBy: string(),
19573
+ /** Failure reason when state is 'failed'; null otherwise. */
19574
+ error: string().nullable()
19575
+ });
19576
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19577
+ var ExportDownloadSchema = object({
19578
+ url: string(),
19579
+ endpoints: array(string())
19580
+ });
19581
+ method(object({
19582
+ deviceId: number(),
19583
+ profile: string(),
19584
+ fromMs: number(),
19585
+ toMs: number(),
19586
+ options: ExportOptionsSchema
19587
+ }), ExportRecordSchema, {
19588
+ kind: "mutation",
19589
+ auth: "protected"
19590
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19591
+ kind: "query",
19592
+ auth: "protected"
19593
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19594
+ kind: "query",
19595
+ auth: "protected"
19596
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19597
+ kind: "mutation",
19598
+ auth: "protected"
19599
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19600
+ kind: "mutation",
19601
+ auth: "protected"
19602
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19603
+ kind: "query",
19604
+ auth: "protected"
19605
+ });
19606
+ /**
19430
19607
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19431
19608
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19432
19609
  * `deviceId`.
@@ -23350,6 +23527,42 @@ Object.freeze({
23350
23527
  addonId: null,
23351
23528
  access: "create"
23352
23529
  },
23530
+ "recordingExport.cancelExport": {
23531
+ capName: "recordingExport",
23532
+ capScope: "system",
23533
+ addonId: null,
23534
+ access: "create"
23535
+ },
23536
+ "recordingExport.createExport": {
23537
+ capName: "recordingExport",
23538
+ capScope: "system",
23539
+ addonId: null,
23540
+ access: "create"
23541
+ },
23542
+ "recordingExport.deleteExport": {
23543
+ capName: "recordingExport",
23544
+ capScope: "system",
23545
+ addonId: null,
23546
+ access: "delete"
23547
+ },
23548
+ "recordingExport.getDownloadUrl": {
23549
+ capName: "recordingExport",
23550
+ capScope: "system",
23551
+ addonId: null,
23552
+ access: "view"
23553
+ },
23554
+ "recordingExport.getExport": {
23555
+ capName: "recordingExport",
23556
+ capScope: "system",
23557
+ addonId: null,
23558
+ access: "view"
23559
+ },
23560
+ "recordingExport.listExports": {
23561
+ capName: "recordingExport",
23562
+ capScope: "system",
23563
+ addonId: null,
23564
+ access: "view"
23565
+ },
23353
23566
  "sceneMonitor.captureReference": {
23354
23567
  capName: "scene-monitor",
23355
23568
  capScope: "device",
@@ -1,6 +1,6 @@
1
1
  import * as path from "node:path";
2
2
  import { randomUUID } from "node:crypto";
3
- //#region ../types/dist/event-category-H4AVePnn.mjs
3
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -153,6 +153,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
153
153
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
154
154
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
155
155
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
156
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
157
+ * progress bar the client reconciles via `recordingExport.getExport`. */
158
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
159
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
160
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
156
161
  EventCategory["DetectionEvent"] = "detection.event";
157
162
  EventCategory["SessionTrackNew"] = "session.track.new";
158
163
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -442,6 +447,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
442
447
  */
443
448
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
444
449
  /**
450
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
451
+ * a package zone — a newly-appeared stationary object of a package class
452
+ * that cleared the class / zone / dwell / size gates. Payload:
453
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
454
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
455
+ * Telemetry (D8): the durable record is the `package-events` store row;
456
+ * this bus topic drives notifier rules + live UI. See
457
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
458
+ */
459
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
460
+ /**
461
+ * Fired by `addon-post-analysis` when a previously-delivered package
462
+ * leaves its zone (the stationary entry departed — moved or swept).
463
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
464
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
465
+ * Telemetry (D8). See package-zones-design §5.2.
466
+ */
467
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
468
+ /**
445
469
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
446
470
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
447
471
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5180,6 +5204,25 @@ function _instanceof(cls, params = {}) {
5180
5204
  };
5181
5205
  return inst;
5182
5206
  }
5207
+ //#endregion
5208
+ //#region ../../node_modules/zod/v4/classic/compat.js
5209
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5210
+ var ZodIssueCode = {
5211
+ invalid_type: "invalid_type",
5212
+ too_big: "too_big",
5213
+ too_small: "too_small",
5214
+ invalid_format: "invalid_format",
5215
+ not_multiple_of: "not_multiple_of",
5216
+ unrecognized_keys: "unrecognized_keys",
5217
+ invalid_union: "invalid_union",
5218
+ invalid_key: "invalid_key",
5219
+ invalid_element: "invalid_element",
5220
+ invalid_value: "invalid_value",
5221
+ custom: "custom"
5222
+ };
5223
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5224
+ var ZodFirstPartyTypeKind;
5225
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5183
5226
  Object.fromEntries([
5184
5227
  {
5185
5228
  id: "overview",
@@ -7222,6 +7265,24 @@ var RecordingRetentionSchema = object({
7222
7265
  maxSizeGb: number().min(0).optional()
7223
7266
  });
7224
7267
  /**
7268
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7269
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7270
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7271
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7272
+ *
7273
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7274
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7275
+ * preset changed over time renders every historical window at the dims it was
7276
+ * written with.
7277
+ */
7278
+ var ScrubThumbnailPresetSchema = _enum([
7279
+ "minimal",
7280
+ "low",
7281
+ "standard",
7282
+ "high",
7283
+ "max"
7284
+ ]);
7285
+ /**
7225
7286
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7226
7287
  *
7227
7288
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7258,7 +7319,14 @@ var RecordingConfigSchema = object({
7258
7319
  * derived into bands once via `migrateConfigToBands`.
7259
7320
  */
7260
7321
  bands: array(RecordingBandSchema).optional(),
7261
- retention: RecordingRetentionSchema.optional()
7322
+ retention: RecordingRetentionSchema.optional(),
7323
+ /**
7324
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7325
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7326
+ * windows only — existing sheets are immutable, and each window's index
7327
+ * carries its own tile dims so mixed-preset history renders correctly.
7328
+ */
7329
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7262
7330
  });
7263
7331
  /**
7264
7332
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12510,7 +12578,11 @@ array(ZoneRuleSchema).readonly();
12510
12578
  * Extend the enum here when a new gating consumer comes online (audio
12511
12579
  * gating, alert filtering, …) — no other surface needs to change.
12512
12580
  */
12513
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12581
+ var ZoneRuleStageEnum = _enum([
12582
+ "motion",
12583
+ "detection",
12584
+ "package"
12585
+ ]);
12514
12586
  DeviceType.Camera, method(object({
12515
12587
  deviceId: number(),
12516
12588
  stage: ZoneRuleStageEnum
@@ -12523,7 +12595,8 @@ DeviceType.Camera, method(object({
12523
12595
  auth: "admin"
12524
12596
  }), object({
12525
12597
  motion: array(ZoneRuleSchema).readonly(),
12526
- detection: array(ZoneRuleSchema).readonly()
12598
+ detection: array(ZoneRuleSchema).readonly(),
12599
+ package: array(ZoneRuleSchema).readonly()
12527
12600
  });
12528
12601
  var ProviderStatusSchema = object({
12529
12602
  connected: boolean(),
@@ -15706,6 +15779,7 @@ var EventKindIconSchema = _enum([
15706
15779
  "smoke",
15707
15780
  "water",
15708
15781
  "button",
15782
+ "package",
15709
15783
  "generic"
15710
15784
  ]);
15711
15785
  var EventKindCategorySchema = _enum([
@@ -15713,7 +15787,8 @@ var EventKindCategorySchema = _enum([
15713
15787
  "audio",
15714
15788
  "detection",
15715
15789
  "sensor",
15716
- "custom"
15790
+ "custom",
15791
+ "package"
15717
15792
  ]);
15718
15793
  var EventKindDescriptorSchema = object({
15719
15794
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19404,6 +19479,108 @@ method(object({
19404
19479
  auth: "admin"
19405
19480
  });
19406
19481
  /**
19482
+ * `recordingExport` cap — render a footage time range into a single downloadable
19483
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19484
+ * bounded lifetime with a durable history, auto-expiry, and optional
19485
+ * delete-after-download.
19486
+ *
19487
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19488
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19489
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19490
+ * input and dispatch to that single provider; the render runs on the node that
19491
+ * owns the footage (no cross-node segment transfer). Download rides the
19492
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19493
+ * SQLite); history rows survive file deletion for audit.
19494
+ */
19495
+ /** Playback-speed multiplier for the render (1 = realtime). */
19496
+ var ExportSpeedSchema = number().min(.25).max(32);
19497
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19498
+ var ExportTimelapseSchema = object({
19499
+ everyMs: number().int().positive(),
19500
+ outputFps: number().int().min(1).max(60).optional()
19501
+ });
19502
+ /**
19503
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19504
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19505
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19506
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19507
+ */
19508
+ var ExportOptionsSchema = object({
19509
+ speed: ExportSpeedSchema.optional(),
19510
+ timelapse: ExportTimelapseSchema.optional(),
19511
+ includeAudio: boolean(),
19512
+ maxLifeMs: number().int().positive(),
19513
+ deleteAfterDownload: boolean(),
19514
+ title: string().max(200).optional()
19515
+ }).superRefine((v, ctx) => {
19516
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19517
+ code: ZodIssueCode.custom,
19518
+ message: "speed and timelapse are mutually exclusive",
19519
+ path: ["timelapse"]
19520
+ });
19521
+ });
19522
+ var ExportStateSchema = _enum([
19523
+ "queued",
19524
+ "rendering",
19525
+ "ready",
19526
+ "failed",
19527
+ "expired",
19528
+ "deleted"
19529
+ ]);
19530
+ /** One export job / history row. */
19531
+ var ExportRecordSchema = object({
19532
+ id: string(),
19533
+ deviceId: number(),
19534
+ profile: string(),
19535
+ fromMs: number(),
19536
+ toMs: number(),
19537
+ options: ExportOptionsSchema,
19538
+ state: ExportStateSchema,
19539
+ /** 0–100 while rendering; null otherwise. */
19540
+ progressPct: number().nullable(),
19541
+ /** File size once ready; null before. */
19542
+ fileBytes: number().nullable(),
19543
+ expiresAt: number(),
19544
+ deleteAfterDownload: boolean(),
19545
+ /** Epoch of the first complete download; null until then. */
19546
+ downloadedAt: number().nullable(),
19547
+ createdAt: number(),
19548
+ /** User id/name that requested the export. */
19549
+ createdBy: string(),
19550
+ /** Failure reason when state is 'failed'; null otherwise. */
19551
+ error: string().nullable()
19552
+ });
19553
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19554
+ var ExportDownloadSchema = object({
19555
+ url: string(),
19556
+ endpoints: array(string())
19557
+ });
19558
+ method(object({
19559
+ deviceId: number(),
19560
+ profile: string(),
19561
+ fromMs: number(),
19562
+ toMs: number(),
19563
+ options: ExportOptionsSchema
19564
+ }), ExportRecordSchema, {
19565
+ kind: "mutation",
19566
+ auth: "protected"
19567
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19568
+ kind: "query",
19569
+ auth: "protected"
19570
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19571
+ kind: "query",
19572
+ auth: "protected"
19573
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19574
+ kind: "mutation",
19575
+ auth: "protected"
19576
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19577
+ kind: "mutation",
19578
+ auth: "protected"
19579
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19580
+ kind: "query",
19581
+ auth: "protected"
19582
+ });
19583
+ /**
19407
19584
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19408
19585
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19409
19586
  * `deviceId`.
@@ -23327,6 +23504,42 @@ Object.freeze({
23327
23504
  addonId: null,
23328
23505
  access: "create"
23329
23506
  },
23507
+ "recordingExport.cancelExport": {
23508
+ capName: "recordingExport",
23509
+ capScope: "system",
23510
+ addonId: null,
23511
+ access: "create"
23512
+ },
23513
+ "recordingExport.createExport": {
23514
+ capName: "recordingExport",
23515
+ capScope: "system",
23516
+ addonId: null,
23517
+ access: "create"
23518
+ },
23519
+ "recordingExport.deleteExport": {
23520
+ capName: "recordingExport",
23521
+ capScope: "system",
23522
+ addonId: null,
23523
+ access: "delete"
23524
+ },
23525
+ "recordingExport.getDownloadUrl": {
23526
+ capName: "recordingExport",
23527
+ capScope: "system",
23528
+ addonId: null,
23529
+ access: "view"
23530
+ },
23531
+ "recordingExport.getExport": {
23532
+ capName: "recordingExport",
23533
+ capScope: "system",
23534
+ addonId: null,
23535
+ access: "view"
23536
+ },
23537
+ "recordingExport.listExports": {
23538
+ capName: "recordingExport",
23539
+ capScope: "system",
23540
+ addonId: null,
23541
+ access: "view"
23542
+ },
23330
23543
  "sceneMonitor.captureReference": {
23331
23544
  capName: "scene-monitor",
23332
23545
  capScope: "device",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BuH7csTY.js");
5
+ const require_shared = require("./shared-ChSRaxCw.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-uJtt1S2z.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-fXbGPtd5.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",