@camstack/addon-tailscale 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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-j2Tcnvk4.js");
27
+ const require_dist = require("../dist-AxWhb5Uh.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-4pXP3j1Q.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-D7Ao4Euk.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-H4AVePnn.mjs
1
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -151,6 +151,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
151
151
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
152
152
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
153
153
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
154
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
155
+ * progress bar the client reconciles via `recordingExport.getExport`. */
156
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
157
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
158
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
154
159
  EventCategory["DetectionEvent"] = "detection.event";
155
160
  EventCategory["SessionTrackNew"] = "session.track.new";
156
161
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -440,6 +445,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
440
445
  */
441
446
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
442
447
  /**
448
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
449
+ * a package zone — a newly-appeared stationary object of a package class
450
+ * that cleared the class / zone / dwell / size gates. Payload:
451
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
452
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
453
+ * Telemetry (D8): the durable record is the `package-events` store row;
454
+ * this bus topic drives notifier rules + live UI. See
455
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
456
+ */
457
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
458
+ /**
459
+ * Fired by `addon-post-analysis` when a previously-delivered package
460
+ * leaves its zone (the stationary entry departed — moved or swept).
461
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
462
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
463
+ * Telemetry (D8). See package-zones-design §5.2.
464
+ */
465
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
466
+ /**
443
467
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
444
468
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
445
469
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5178,6 +5202,25 @@ function _instanceof(cls, params = {}) {
5178
5202
  };
5179
5203
  return inst;
5180
5204
  }
5205
+ //#endregion
5206
+ //#region ../../node_modules/zod/v4/classic/compat.js
5207
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5208
+ var ZodIssueCode = {
5209
+ invalid_type: "invalid_type",
5210
+ too_big: "too_big",
5211
+ too_small: "too_small",
5212
+ invalid_format: "invalid_format",
5213
+ not_multiple_of: "not_multiple_of",
5214
+ unrecognized_keys: "unrecognized_keys",
5215
+ invalid_union: "invalid_union",
5216
+ invalid_key: "invalid_key",
5217
+ invalid_element: "invalid_element",
5218
+ invalid_value: "invalid_value",
5219
+ custom: "custom"
5220
+ };
5221
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5222
+ var ZodFirstPartyTypeKind;
5223
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5181
5224
  Object.fromEntries([
5182
5225
  {
5183
5226
  id: "overview",
@@ -7220,6 +7263,24 @@ var RecordingRetentionSchema = object({
7220
7263
  maxSizeGb: number().min(0).optional()
7221
7264
  });
7222
7265
  /**
7266
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7267
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7268
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7269
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7270
+ *
7271
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7272
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7273
+ * preset changed over time renders every historical window at the dims it was
7274
+ * written with.
7275
+ */
7276
+ var ScrubThumbnailPresetSchema = _enum([
7277
+ "minimal",
7278
+ "low",
7279
+ "standard",
7280
+ "high",
7281
+ "max"
7282
+ ]);
7283
+ /**
7223
7284
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7224
7285
  *
7225
7286
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7256,7 +7317,14 @@ var RecordingConfigSchema = object({
7256
7317
  * derived into bands once via `migrateConfigToBands`.
7257
7318
  */
7258
7319
  bands: array(RecordingBandSchema).optional(),
7259
- retention: RecordingRetentionSchema.optional()
7320
+ retention: RecordingRetentionSchema.optional(),
7321
+ /**
7322
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7323
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7324
+ * windows only — existing sheets are immutable, and each window's index
7325
+ * carries its own tile dims so mixed-preset history renders correctly.
7326
+ */
7327
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7260
7328
  });
7261
7329
  /**
7262
7330
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12508,7 +12576,11 @@ array(ZoneRuleSchema).readonly();
12508
12576
  * Extend the enum here when a new gating consumer comes online (audio
12509
12577
  * gating, alert filtering, …) — no other surface needs to change.
12510
12578
  */
12511
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12579
+ var ZoneRuleStageEnum = _enum([
12580
+ "motion",
12581
+ "detection",
12582
+ "package"
12583
+ ]);
12512
12584
  DeviceType.Camera, method(object({
12513
12585
  deviceId: number(),
12514
12586
  stage: ZoneRuleStageEnum
@@ -12521,7 +12593,8 @@ DeviceType.Camera, method(object({
12521
12593
  auth: "admin"
12522
12594
  }), object({
12523
12595
  motion: array(ZoneRuleSchema).readonly(),
12524
- detection: array(ZoneRuleSchema).readonly()
12596
+ detection: array(ZoneRuleSchema).readonly(),
12597
+ package: array(ZoneRuleSchema).readonly()
12525
12598
  });
12526
12599
  var ProviderStatusSchema = object({
12527
12600
  connected: boolean(),
@@ -15721,6 +15794,7 @@ var EventKindIconSchema = _enum([
15721
15794
  "smoke",
15722
15795
  "water",
15723
15796
  "button",
15797
+ "package",
15724
15798
  "generic"
15725
15799
  ]);
15726
15800
  var EventKindCategorySchema = _enum([
@@ -15728,7 +15802,8 @@ var EventKindCategorySchema = _enum([
15728
15802
  "audio",
15729
15803
  "detection",
15730
15804
  "sensor",
15731
- "custom"
15805
+ "custom",
15806
+ "package"
15732
15807
  ]);
15733
15808
  var EventKindDescriptorSchema = object({
15734
15809
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19435,6 +19510,108 @@ method(object({
19435
19510
  auth: "admin"
19436
19511
  });
19437
19512
  /**
19513
+ * `recordingExport` cap — render a footage time range into a single downloadable
19514
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19515
+ * bounded lifetime with a durable history, auto-expiry, and optional
19516
+ * delete-after-download.
19517
+ *
19518
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19519
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19520
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19521
+ * input and dispatch to that single provider; the render runs on the node that
19522
+ * owns the footage (no cross-node segment transfer). Download rides the
19523
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19524
+ * SQLite); history rows survive file deletion for audit.
19525
+ */
19526
+ /** Playback-speed multiplier for the render (1 = realtime). */
19527
+ var ExportSpeedSchema = number().min(.25).max(32);
19528
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19529
+ var ExportTimelapseSchema = object({
19530
+ everyMs: number().int().positive(),
19531
+ outputFps: number().int().min(1).max(60).optional()
19532
+ });
19533
+ /**
19534
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19535
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19536
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19537
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19538
+ */
19539
+ var ExportOptionsSchema = object({
19540
+ speed: ExportSpeedSchema.optional(),
19541
+ timelapse: ExportTimelapseSchema.optional(),
19542
+ includeAudio: boolean(),
19543
+ maxLifeMs: number().int().positive(),
19544
+ deleteAfterDownload: boolean(),
19545
+ title: string().max(200).optional()
19546
+ }).superRefine((v, ctx) => {
19547
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19548
+ code: ZodIssueCode.custom,
19549
+ message: "speed and timelapse are mutually exclusive",
19550
+ path: ["timelapse"]
19551
+ });
19552
+ });
19553
+ var ExportStateSchema = _enum([
19554
+ "queued",
19555
+ "rendering",
19556
+ "ready",
19557
+ "failed",
19558
+ "expired",
19559
+ "deleted"
19560
+ ]);
19561
+ /** One export job / history row. */
19562
+ var ExportRecordSchema = object({
19563
+ id: string(),
19564
+ deviceId: number(),
19565
+ profile: string(),
19566
+ fromMs: number(),
19567
+ toMs: number(),
19568
+ options: ExportOptionsSchema,
19569
+ state: ExportStateSchema,
19570
+ /** 0–100 while rendering; null otherwise. */
19571
+ progressPct: number().nullable(),
19572
+ /** File size once ready; null before. */
19573
+ fileBytes: number().nullable(),
19574
+ expiresAt: number(),
19575
+ deleteAfterDownload: boolean(),
19576
+ /** Epoch of the first complete download; null until then. */
19577
+ downloadedAt: number().nullable(),
19578
+ createdAt: number(),
19579
+ /** User id/name that requested the export. */
19580
+ createdBy: string(),
19581
+ /** Failure reason when state is 'failed'; null otherwise. */
19582
+ error: string().nullable()
19583
+ });
19584
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19585
+ var ExportDownloadSchema = object({
19586
+ url: string(),
19587
+ endpoints: array(string())
19588
+ });
19589
+ method(object({
19590
+ deviceId: number(),
19591
+ profile: string(),
19592
+ fromMs: number(),
19593
+ toMs: number(),
19594
+ options: ExportOptionsSchema
19595
+ }), ExportRecordSchema, {
19596
+ kind: "mutation",
19597
+ auth: "protected"
19598
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19599
+ kind: "query",
19600
+ auth: "protected"
19601
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19602
+ kind: "query",
19603
+ auth: "protected"
19604
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19605
+ kind: "mutation",
19606
+ auth: "protected"
19607
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19608
+ kind: "mutation",
19609
+ auth: "protected"
19610
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19611
+ kind: "query",
19612
+ auth: "protected"
19613
+ });
19614
+ /**
19438
19615
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19439
19616
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19440
19617
  * `deviceId`.
@@ -23358,6 +23535,42 @@ Object.freeze({
23358
23535
  addonId: null,
23359
23536
  access: "create"
23360
23537
  },
23538
+ "recordingExport.cancelExport": {
23539
+ capName: "recordingExport",
23540
+ capScope: "system",
23541
+ addonId: null,
23542
+ access: "create"
23543
+ },
23544
+ "recordingExport.createExport": {
23545
+ capName: "recordingExport",
23546
+ capScope: "system",
23547
+ addonId: null,
23548
+ access: "create"
23549
+ },
23550
+ "recordingExport.deleteExport": {
23551
+ capName: "recordingExport",
23552
+ capScope: "system",
23553
+ addonId: null,
23554
+ access: "delete"
23555
+ },
23556
+ "recordingExport.getDownloadUrl": {
23557
+ capName: "recordingExport",
23558
+ capScope: "system",
23559
+ addonId: null,
23560
+ access: "view"
23561
+ },
23562
+ "recordingExport.getExport": {
23563
+ capName: "recordingExport",
23564
+ capScope: "system",
23565
+ addonId: null,
23566
+ access: "view"
23567
+ },
23568
+ "recordingExport.listExports": {
23569
+ capName: "recordingExport",
23570
+ capScope: "system",
23571
+ addonId: null,
23572
+ access: "view"
23573
+ },
23361
23574
  "sceneMonitor.captureReference": {
23362
23575
  capName: "scene-monitor",
23363
23576
  capScope: "device",
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-H4AVePnn.mjs
1
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -151,6 +151,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
151
151
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
152
152
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
153
153
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
154
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
155
+ * progress bar the client reconciles via `recordingExport.getExport`. */
156
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
157
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
158
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
154
159
  EventCategory["DetectionEvent"] = "detection.event";
155
160
  EventCategory["SessionTrackNew"] = "session.track.new";
156
161
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -440,6 +445,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
440
445
  */
441
446
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
442
447
  /**
448
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
449
+ * a package zone — a newly-appeared stationary object of a package class
450
+ * that cleared the class / zone / dwell / size gates. Payload:
451
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
452
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
453
+ * Telemetry (D8): the durable record is the `package-events` store row;
454
+ * this bus topic drives notifier rules + live UI. See
455
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
456
+ */
457
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
458
+ /**
459
+ * Fired by `addon-post-analysis` when a previously-delivered package
460
+ * leaves its zone (the stationary entry departed — moved or swept).
461
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
462
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
463
+ * Telemetry (D8). See package-zones-design §5.2.
464
+ */
465
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
466
+ /**
443
467
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
444
468
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
445
469
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -5178,6 +5202,25 @@ function _instanceof(cls, params = {}) {
5178
5202
  };
5179
5203
  return inst;
5180
5204
  }
5205
+ //#endregion
5206
+ //#region ../../node_modules/zod/v4/classic/compat.js
5207
+ /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
5208
+ var ZodIssueCode = {
5209
+ invalid_type: "invalid_type",
5210
+ too_big: "too_big",
5211
+ too_small: "too_small",
5212
+ invalid_format: "invalid_format",
5213
+ not_multiple_of: "not_multiple_of",
5214
+ unrecognized_keys: "unrecognized_keys",
5215
+ invalid_union: "invalid_union",
5216
+ invalid_key: "invalid_key",
5217
+ invalid_element: "invalid_element",
5218
+ invalid_value: "invalid_value",
5219
+ custom: "custom"
5220
+ };
5221
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
5222
+ var ZodFirstPartyTypeKind;
5223
+ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5181
5224
  Object.fromEntries([
5182
5225
  {
5183
5226
  id: "overview",
@@ -7220,6 +7263,24 @@ var RecordingRetentionSchema = object({
7220
7263
  maxSizeGb: number().min(0).optional()
7221
7264
  });
7222
7265
  /**
7266
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7267
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7268
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7269
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7270
+ *
7271
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7272
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7273
+ * preset changed over time renders every historical window at the dims it was
7274
+ * written with.
7275
+ */
7276
+ var ScrubThumbnailPresetSchema = _enum([
7277
+ "minimal",
7278
+ "low",
7279
+ "standard",
7280
+ "high",
7281
+ "max"
7282
+ ]);
7283
+ /**
7223
7284
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7224
7285
  *
7225
7286
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7256,7 +7317,14 @@ var RecordingConfigSchema = object({
7256
7317
  * derived into bands once via `migrateConfigToBands`.
7257
7318
  */
7258
7319
  bands: array(RecordingBandSchema).optional(),
7259
- retention: RecordingRetentionSchema.optional()
7320
+ retention: RecordingRetentionSchema.optional(),
7321
+ /**
7322
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7323
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7324
+ * windows only — existing sheets are immutable, and each window's index
7325
+ * carries its own tile dims so mixed-preset history renders correctly.
7326
+ */
7327
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7260
7328
  });
7261
7329
  /**
7262
7330
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -12508,7 +12576,11 @@ array(ZoneRuleSchema).readonly();
12508
12576
  * Extend the enum here when a new gating consumer comes online (audio
12509
12577
  * gating, alert filtering, …) — no other surface needs to change.
12510
12578
  */
12511
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12579
+ var ZoneRuleStageEnum = _enum([
12580
+ "motion",
12581
+ "detection",
12582
+ "package"
12583
+ ]);
12512
12584
  DeviceType.Camera, method(object({
12513
12585
  deviceId: number(),
12514
12586
  stage: ZoneRuleStageEnum
@@ -12521,7 +12593,8 @@ DeviceType.Camera, method(object({
12521
12593
  auth: "admin"
12522
12594
  }), object({
12523
12595
  motion: array(ZoneRuleSchema).readonly(),
12524
- detection: array(ZoneRuleSchema).readonly()
12596
+ detection: array(ZoneRuleSchema).readonly(),
12597
+ package: array(ZoneRuleSchema).readonly()
12525
12598
  });
12526
12599
  var ProviderStatusSchema = object({
12527
12600
  connected: boolean(),
@@ -15721,6 +15794,7 @@ var EventKindIconSchema = _enum([
15721
15794
  "smoke",
15722
15795
  "water",
15723
15796
  "button",
15797
+ "package",
15724
15798
  "generic"
15725
15799
  ]);
15726
15800
  var EventKindCategorySchema = _enum([
@@ -15728,7 +15802,8 @@ var EventKindCategorySchema = _enum([
15728
15802
  "audio",
15729
15803
  "detection",
15730
15804
  "sensor",
15731
- "custom"
15805
+ "custom",
15806
+ "package"
15732
15807
  ]);
15733
15808
  var EventKindDescriptorSchema = object({
15734
15809
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19435,6 +19510,108 @@ method(object({
19435
19510
  auth: "admin"
19436
19511
  });
19437
19512
  /**
19513
+ * `recordingExport` cap — render a footage time range into a single downloadable
19514
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19515
+ * bounded lifetime with a durable history, auto-expiry, and optional
19516
+ * delete-after-download.
19517
+ *
19518
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19519
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19520
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19521
+ * input and dispatch to that single provider; the render runs on the node that
19522
+ * owns the footage (no cross-node segment transfer). Download rides the
19523
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19524
+ * SQLite); history rows survive file deletion for audit.
19525
+ */
19526
+ /** Playback-speed multiplier for the render (1 = realtime). */
19527
+ var ExportSpeedSchema = number().min(.25).max(32);
19528
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19529
+ var ExportTimelapseSchema = object({
19530
+ everyMs: number().int().positive(),
19531
+ outputFps: number().int().min(1).max(60).optional()
19532
+ });
19533
+ /**
19534
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19535
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19536
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19537
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19538
+ */
19539
+ var ExportOptionsSchema = object({
19540
+ speed: ExportSpeedSchema.optional(),
19541
+ timelapse: ExportTimelapseSchema.optional(),
19542
+ includeAudio: boolean(),
19543
+ maxLifeMs: number().int().positive(),
19544
+ deleteAfterDownload: boolean(),
19545
+ title: string().max(200).optional()
19546
+ }).superRefine((v, ctx) => {
19547
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19548
+ code: ZodIssueCode.custom,
19549
+ message: "speed and timelapse are mutually exclusive",
19550
+ path: ["timelapse"]
19551
+ });
19552
+ });
19553
+ var ExportStateSchema = _enum([
19554
+ "queued",
19555
+ "rendering",
19556
+ "ready",
19557
+ "failed",
19558
+ "expired",
19559
+ "deleted"
19560
+ ]);
19561
+ /** One export job / history row. */
19562
+ var ExportRecordSchema = object({
19563
+ id: string(),
19564
+ deviceId: number(),
19565
+ profile: string(),
19566
+ fromMs: number(),
19567
+ toMs: number(),
19568
+ options: ExportOptionsSchema,
19569
+ state: ExportStateSchema,
19570
+ /** 0–100 while rendering; null otherwise. */
19571
+ progressPct: number().nullable(),
19572
+ /** File size once ready; null before. */
19573
+ fileBytes: number().nullable(),
19574
+ expiresAt: number(),
19575
+ deleteAfterDownload: boolean(),
19576
+ /** Epoch of the first complete download; null until then. */
19577
+ downloadedAt: number().nullable(),
19578
+ createdAt: number(),
19579
+ /** User id/name that requested the export. */
19580
+ createdBy: string(),
19581
+ /** Failure reason when state is 'failed'; null otherwise. */
19582
+ error: string().nullable()
19583
+ });
19584
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19585
+ var ExportDownloadSchema = object({
19586
+ url: string(),
19587
+ endpoints: array(string())
19588
+ });
19589
+ method(object({
19590
+ deviceId: number(),
19591
+ profile: string(),
19592
+ fromMs: number(),
19593
+ toMs: number(),
19594
+ options: ExportOptionsSchema
19595
+ }), ExportRecordSchema, {
19596
+ kind: "mutation",
19597
+ auth: "protected"
19598
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19599
+ kind: "query",
19600
+ auth: "protected"
19601
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19602
+ kind: "query",
19603
+ auth: "protected"
19604
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19605
+ kind: "mutation",
19606
+ auth: "protected"
19607
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19608
+ kind: "mutation",
19609
+ auth: "protected"
19610
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19611
+ kind: "query",
19612
+ auth: "protected"
19613
+ });
19614
+ /**
19438
19615
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19439
19616
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19440
19617
  * `deviceId`.
@@ -23358,6 +23535,42 @@ Object.freeze({
23358
23535
  addonId: null,
23359
23536
  access: "create"
23360
23537
  },
23538
+ "recordingExport.cancelExport": {
23539
+ capName: "recordingExport",
23540
+ capScope: "system",
23541
+ addonId: null,
23542
+ access: "create"
23543
+ },
23544
+ "recordingExport.createExport": {
23545
+ capName: "recordingExport",
23546
+ capScope: "system",
23547
+ addonId: null,
23548
+ access: "create"
23549
+ },
23550
+ "recordingExport.deleteExport": {
23551
+ capName: "recordingExport",
23552
+ capScope: "system",
23553
+ addonId: null,
23554
+ access: "delete"
23555
+ },
23556
+ "recordingExport.getDownloadUrl": {
23557
+ capName: "recordingExport",
23558
+ capScope: "system",
23559
+ addonId: null,
23560
+ access: "view"
23561
+ },
23562
+ "recordingExport.getExport": {
23563
+ capName: "recordingExport",
23564
+ capScope: "system",
23565
+ addonId: null,
23566
+ access: "view"
23567
+ },
23568
+ "recordingExport.listExports": {
23569
+ capName: "recordingExport",
23570
+ capScope: "system",
23571
+ addonId: null,
23572
+ access: "view"
23573
+ },
23361
23574
  "sceneMonitor.captureReference": {
23362
23575
  capName: "scene-monitor",
23363
23576
  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_dist = require("../dist-j2Tcnvk4.js");
5
+ const require_dist = require("../dist-AxWhb5Uh.js");
6
6
  let node_child_process = require("node:child_process");
7
7
  let node_util = require("node:util");
8
8
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-4pXP3j1Q.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-D7Ao4Euk.mjs";
2
2
  import { execFile } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import { randomUUID } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",