@camstack/addon-static-turn 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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
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",
@@ -7285,6 +7328,62 @@ var RecordingConfigSchema = object({
7285
7328
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7286
7329
  });
7287
7330
  /**
7331
+ * Ops-log — the durable, append-only operations audit shared by the
7332
+ * recordings and events management surfaces.
7333
+ *
7334
+ * ONE row shape is reused for both domains so a single "Activity" view can
7335
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7336
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7337
+ * management operation, WHY it ran (reason), and its measurable effect
7338
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7339
+ * never fail the operation it records.
7340
+ */
7341
+ /** Which management domain the operation belongs to. */
7342
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7343
+ /** The kind of management operation performed. */
7344
+ var OpsLogOpSchema = _enum([
7345
+ "prune",
7346
+ "manual-delete",
7347
+ "rescan",
7348
+ "retention-run"
7349
+ ]);
7350
+ /** Why the operation ran. */
7351
+ var OpsLogReasonSchema = _enum([
7352
+ "retention",
7353
+ "quota",
7354
+ "manual",
7355
+ "operator"
7356
+ ]);
7357
+ /** One audit row, shared verbatim by both domains. */
7358
+ var OpsLogEntrySchema = object({
7359
+ /** Unique row id. */
7360
+ id: string(),
7361
+ /** Epoch ms the operation completed. */
7362
+ at: number(),
7363
+ domain: OpsLogDomainSchema,
7364
+ op: OpsLogOpSchema,
7365
+ reason: OpsLogReasonSchema,
7366
+ /** The camera the op targeted; null for a cluster/global op. */
7367
+ deviceId: number().nullable(),
7368
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7369
+ nodeId: string(),
7370
+ /** Buckets / rows deleted (op-specific unit). */
7371
+ itemsAffected: number(),
7372
+ /** Bytes reclaimed by the op (0 when not measurable). */
7373
+ bytesReclaimed: number(),
7374
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7375
+ detail: string().nullable(),
7376
+ /** Who/what triggered the op. */
7377
+ actor: string()
7378
+ });
7379
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7380
+ var OpsLogQueryInputSchema = object({
7381
+ /** Restrict to a single camera; omit for every row. */
7382
+ deviceId: number().optional(),
7383
+ /** Max rows returned, newest-first. */
7384
+ limit: number().int().min(1).max(1e3).optional()
7385
+ });
7386
+ /**
7288
7387
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7289
7388
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7290
7389
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -12534,7 +12633,11 @@ array(ZoneRuleSchema).readonly();
12534
12633
  * Extend the enum here when a new gating consumer comes online (audio
12535
12634
  * gating, alert filtering, …) — no other surface needs to change.
12536
12635
  */
12537
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12636
+ var ZoneRuleStageEnum = _enum([
12637
+ "motion",
12638
+ "detection",
12639
+ "package"
12640
+ ]);
12538
12641
  DeviceType.Camera, method(object({
12539
12642
  deviceId: number(),
12540
12643
  stage: ZoneRuleStageEnum
@@ -12547,7 +12650,8 @@ DeviceType.Camera, method(object({
12547
12650
  auth: "admin"
12548
12651
  }), object({
12549
12652
  motion: array(ZoneRuleSchema).readonly(),
12550
- detection: array(ZoneRuleSchema).readonly()
12653
+ detection: array(ZoneRuleSchema).readonly(),
12654
+ package: array(ZoneRuleSchema).readonly()
12551
12655
  });
12552
12656
  var ProviderStatusSchema = object({
12553
12657
  connected: boolean(),
@@ -15730,6 +15834,7 @@ var EventKindIconSchema = _enum([
15730
15834
  "smoke",
15731
15835
  "water",
15732
15836
  "button",
15837
+ "package",
15733
15838
  "generic"
15734
15839
  ]);
15735
15840
  var EventKindCategorySchema = _enum([
@@ -15737,7 +15842,8 @@ var EventKindCategorySchema = _enum([
15737
15842
  "audio",
15738
15843
  "detection",
15739
15844
  "sensor",
15740
- "custom"
15845
+ "custom",
15846
+ "package"
15741
15847
  ]);
15742
15848
  var EventKindDescriptorSchema = object({
15743
15849
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -16078,6 +16184,26 @@ var TrackCascadeCountsSchema = object({
16078
16184
  /** Per-track CLIP search vectors removed (best-effort). */
16079
16185
  embeddings: number().int()
16080
16186
  });
16187
+ /** Event-store footprint for one camera. */
16188
+ var EventStoreDeviceFootprintSchema = object({
16189
+ deviceId: number(),
16190
+ /** Persisted event rows (motion + object + audio) for the camera. */
16191
+ rows: number().int(),
16192
+ /** Event-owned media bytes on disk for the camera. */
16193
+ bytes: number().int()
16194
+ });
16195
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16196
+ var EventStoreFootprintSchema = object({
16197
+ totalRows: number().int(),
16198
+ totalBytes: number().int(),
16199
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16200
+ });
16201
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16202
+ var EventPruneCountsSchema = object({
16203
+ motion: number().int(),
16204
+ object: number().int(),
16205
+ audio: number().int()
16206
+ });
16081
16207
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16082
16208
  deviceId: number(),
16083
16209
  trackId: string()
@@ -16141,6 +16267,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16141
16267
  }), {
16142
16268
  kind: "mutation",
16143
16269
  auth: "admin"
16270
+ }), method(object({}), EventStoreFootprintSchema, {
16271
+ kind: "query",
16272
+ auth: "admin"
16273
+ }), method(object({
16274
+ olderThanMs: number(),
16275
+ reason: OpsLogReasonSchema.optional()
16276
+ }), EventPruneCountsSchema, {
16277
+ kind: "mutation",
16278
+ auth: "admin"
16279
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16280
+ kind: "mutation",
16281
+ auth: "admin"
16282
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16283
+ kind: "query",
16284
+ auth: "admin"
16144
16285
  }), method(object({
16145
16286
  eventId: string(),
16146
16287
  kind: MediaFileKindEnum.optional()
@@ -19397,13 +19538,131 @@ method(object({
19397
19538
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19398
19539
  kind: "mutation",
19399
19540
  auth: "admin"
19400
- }), method(object({ deviceId: number() }), object({
19541
+ }), method(object({
19542
+ deviceId: number(),
19543
+ reason: OpsLogReasonSchema.optional()
19544
+ }), object({
19401
19545
  floorMs: number().nullable(),
19402
19546
  deletedBuckets: number().int(),
19403
19547
  reclaimedBytes: number().int()
19404
19548
  }), {
19405
19549
  kind: "mutation",
19406
19550
  auth: "admin"
19551
+ }), method(object({
19552
+ deviceId: number(),
19553
+ fromMs: number().optional(),
19554
+ toMs: number().optional()
19555
+ }), object({
19556
+ deletedBuckets: number().int(),
19557
+ reclaimedBytes: number().int()
19558
+ }), {
19559
+ kind: "mutation",
19560
+ auth: "admin"
19561
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19562
+ kind: "query",
19563
+ auth: "admin"
19564
+ });
19565
+ /**
19566
+ * `recordingExport` cap — render a footage time range into a single downloadable
19567
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19568
+ * bounded lifetime with a durable history, auto-expiry, and optional
19569
+ * delete-after-download.
19570
+ *
19571
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19572
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19573
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19574
+ * input and dispatch to that single provider; the render runs on the node that
19575
+ * owns the footage (no cross-node segment transfer). Download rides the
19576
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19577
+ * SQLite); history rows survive file deletion for audit.
19578
+ */
19579
+ /** Playback-speed multiplier for the render (1 = realtime). */
19580
+ var ExportSpeedSchema = number().min(.25).max(32);
19581
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19582
+ var ExportTimelapseSchema = object({
19583
+ everyMs: number().int().positive(),
19584
+ outputFps: number().int().min(1).max(60).optional()
19585
+ });
19586
+ /**
19587
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19588
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19589
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19590
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19591
+ */
19592
+ var ExportOptionsSchema = object({
19593
+ speed: ExportSpeedSchema.optional(),
19594
+ timelapse: ExportTimelapseSchema.optional(),
19595
+ includeAudio: boolean(),
19596
+ maxLifeMs: number().int().positive(),
19597
+ deleteAfterDownload: boolean(),
19598
+ title: string().max(200).optional()
19599
+ }).superRefine((v, ctx) => {
19600
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19601
+ code: ZodIssueCode.custom,
19602
+ message: "speed and timelapse are mutually exclusive",
19603
+ path: ["timelapse"]
19604
+ });
19605
+ });
19606
+ var ExportStateSchema = _enum([
19607
+ "queued",
19608
+ "rendering",
19609
+ "ready",
19610
+ "failed",
19611
+ "expired",
19612
+ "deleted"
19613
+ ]);
19614
+ /** One export job / history row. */
19615
+ var ExportRecordSchema = object({
19616
+ id: string(),
19617
+ deviceId: number(),
19618
+ profile: string(),
19619
+ fromMs: number(),
19620
+ toMs: number(),
19621
+ options: ExportOptionsSchema,
19622
+ state: ExportStateSchema,
19623
+ /** 0–100 while rendering; null otherwise. */
19624
+ progressPct: number().nullable(),
19625
+ /** File size once ready; null before. */
19626
+ fileBytes: number().nullable(),
19627
+ expiresAt: number(),
19628
+ deleteAfterDownload: boolean(),
19629
+ /** Epoch of the first complete download; null until then. */
19630
+ downloadedAt: number().nullable(),
19631
+ createdAt: number(),
19632
+ /** User id/name that requested the export. */
19633
+ createdBy: string(),
19634
+ /** Failure reason when state is 'failed'; null otherwise. */
19635
+ error: string().nullable()
19636
+ });
19637
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19638
+ var ExportDownloadSchema = object({
19639
+ url: string(),
19640
+ endpoints: array(string())
19641
+ });
19642
+ method(object({
19643
+ deviceId: number(),
19644
+ profile: string(),
19645
+ fromMs: number(),
19646
+ toMs: number(),
19647
+ options: ExportOptionsSchema
19648
+ }), ExportRecordSchema, {
19649
+ kind: "mutation",
19650
+ auth: "protected"
19651
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19652
+ kind: "query",
19653
+ auth: "protected"
19654
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19655
+ kind: "query",
19656
+ auth: "protected"
19657
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19658
+ kind: "mutation",
19659
+ auth: "protected"
19660
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19661
+ kind: "mutation",
19662
+ auth: "protected"
19663
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19664
+ kind: "query",
19665
+ auth: "protected"
19407
19666
  });
19408
19667
  /**
19409
19668
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -22423,6 +22682,12 @@ Object.freeze({
22423
22682
  addonId: null,
22424
22683
  access: "delete"
22425
22684
  },
22685
+ "pipelineAnalytics.deleteDeviceEvents": {
22686
+ capName: "pipeline-analytics",
22687
+ capScope: "device",
22688
+ addonId: null,
22689
+ access: "delete"
22690
+ },
22426
22691
  "pipelineAnalytics.deleteTracks": {
22427
22692
  capName: "pipeline-analytics",
22428
22693
  capScope: "device",
@@ -22453,6 +22718,12 @@ Object.freeze({
22453
22718
  addonId: null,
22454
22719
  access: "view"
22455
22720
  },
22721
+ "pipelineAnalytics.getEventStoreFootprint": {
22722
+ capName: "pipeline-analytics",
22723
+ capScope: "device",
22724
+ addonId: null,
22725
+ access: "view"
22726
+ },
22456
22727
  "pipelineAnalytics.getKeyEvents": {
22457
22728
  capName: "pipeline-analytics",
22458
22729
  capScope: "device",
@@ -22495,6 +22766,12 @@ Object.freeze({
22495
22766
  addonId: null,
22496
22767
  access: "view"
22497
22768
  },
22769
+ "pipelineAnalytics.listOpsLog": {
22770
+ capName: "pipeline-analytics",
22771
+ capScope: "device",
22772
+ addonId: null,
22773
+ access: "view"
22774
+ },
22498
22775
  "pipelineAnalytics.listRecentTracks": {
22499
22776
  capName: "pipeline-analytics",
22500
22777
  capScope: "device",
@@ -22507,6 +22784,12 @@ Object.freeze({
22507
22784
  addonId: null,
22508
22785
  access: "view"
22509
22786
  },
22787
+ "pipelineAnalytics.pruneEvents": {
22788
+ capName: "pipeline-analytics",
22789
+ capScope: "device",
22790
+ addonId: null,
22791
+ access: "create"
22792
+ },
22510
22793
  "pipelineAnalytics.pruneEventsBefore": {
22511
22794
  capName: "pipeline-analytics",
22512
22795
  capScope: "device",
@@ -23269,6 +23552,12 @@ Object.freeze({
23269
23552
  addonId: null,
23270
23553
  access: "create"
23271
23554
  },
23555
+ "recording.deleteFootprint": {
23556
+ capName: "recording",
23557
+ capScope: "system",
23558
+ addonId: null,
23559
+ access: "delete"
23560
+ },
23272
23561
  "recording.getAvailability": {
23273
23562
  capName: "recording",
23274
23563
  capScope: "system",
@@ -23299,6 +23588,12 @@ Object.freeze({
23299
23588
  addonId: null,
23300
23589
  access: "view"
23301
23590
  },
23591
+ "recording.listOpsLog": {
23592
+ capName: "recording",
23593
+ capScope: "system",
23594
+ addonId: null,
23595
+ access: "view"
23596
+ },
23302
23597
  "recording.locateSegment": {
23303
23598
  capName: "recording",
23304
23599
  capScope: "system",
@@ -23329,6 +23624,42 @@ Object.freeze({
23329
23624
  addonId: null,
23330
23625
  access: "create"
23331
23626
  },
23627
+ "recordingExport.cancelExport": {
23628
+ capName: "recordingExport",
23629
+ capScope: "system",
23630
+ addonId: null,
23631
+ access: "create"
23632
+ },
23633
+ "recordingExport.createExport": {
23634
+ capName: "recordingExport",
23635
+ capScope: "system",
23636
+ addonId: null,
23637
+ access: "create"
23638
+ },
23639
+ "recordingExport.deleteExport": {
23640
+ capName: "recordingExport",
23641
+ capScope: "system",
23642
+ addonId: null,
23643
+ access: "delete"
23644
+ },
23645
+ "recordingExport.getDownloadUrl": {
23646
+ capName: "recordingExport",
23647
+ capScope: "system",
23648
+ addonId: null,
23649
+ access: "view"
23650
+ },
23651
+ "recordingExport.getExport": {
23652
+ capName: "recordingExport",
23653
+ capScope: "system",
23654
+ addonId: null,
23655
+ access: "view"
23656
+ },
23657
+ "recordingExport.listExports": {
23658
+ capName: "recordingExport",
23659
+ capScope: "system",
23660
+ addonId: null,
23661
+ access: "view"
23662
+ },
23332
23663
  "sceneMonitor.captureReference": {
23333
23664
  capName: "scene-monitor",
23334
23665
  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",
@@ -7284,6 +7327,62 @@ var RecordingConfigSchema = object({
7284
7327
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7285
7328
  });
7286
7329
  /**
7330
+ * Ops-log — the durable, append-only operations audit shared by the
7331
+ * recordings and events management surfaces.
7332
+ *
7333
+ * ONE row shape is reused for both domains so a single "Activity" view can
7334
+ * merge the recorder's DurableState ring (recordings ops-log) and the
7335
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
7336
+ * management operation, WHY it ran (reason), and its measurable effect
7337
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
7338
+ * never fail the operation it records.
7339
+ */
7340
+ /** Which management domain the operation belongs to. */
7341
+ var OpsLogDomainSchema = _enum(["recording", "events"]);
7342
+ /** The kind of management operation performed. */
7343
+ var OpsLogOpSchema = _enum([
7344
+ "prune",
7345
+ "manual-delete",
7346
+ "rescan",
7347
+ "retention-run"
7348
+ ]);
7349
+ /** Why the operation ran. */
7350
+ var OpsLogReasonSchema = _enum([
7351
+ "retention",
7352
+ "quota",
7353
+ "manual",
7354
+ "operator"
7355
+ ]);
7356
+ /** One audit row, shared verbatim by both domains. */
7357
+ var OpsLogEntrySchema = object({
7358
+ /** Unique row id. */
7359
+ id: string(),
7360
+ /** Epoch ms the operation completed. */
7361
+ at: number(),
7362
+ domain: OpsLogDomainSchema,
7363
+ op: OpsLogOpSchema,
7364
+ reason: OpsLogReasonSchema,
7365
+ /** The camera the op targeted; null for a cluster/global op. */
7366
+ deviceId: number().nullable(),
7367
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
7368
+ nodeId: string(),
7369
+ /** Buckets / rows deleted (op-specific unit). */
7370
+ itemsAffected: number(),
7371
+ /** Bytes reclaimed by the op (0 when not measurable). */
7372
+ bytesReclaimed: number(),
7373
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
7374
+ detail: string().nullable(),
7375
+ /** Who/what triggered the op. */
7376
+ actor: string()
7377
+ });
7378
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
7379
+ var OpsLogQueryInputSchema = object({
7380
+ /** Restrict to a single camera; omit for every row. */
7381
+ deviceId: number().optional(),
7382
+ /** Max rows returned, newest-first. */
7383
+ limit: number().int().min(1).max(1e3).optional()
7384
+ });
7385
+ /**
7287
7386
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7288
7387
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7289
7388
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -12533,7 +12632,11 @@ array(ZoneRuleSchema).readonly();
12533
12632
  * Extend the enum here when a new gating consumer comes online (audio
12534
12633
  * gating, alert filtering, …) — no other surface needs to change.
12535
12634
  */
12536
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12635
+ var ZoneRuleStageEnum = _enum([
12636
+ "motion",
12637
+ "detection",
12638
+ "package"
12639
+ ]);
12537
12640
  DeviceType.Camera, method(object({
12538
12641
  deviceId: number(),
12539
12642
  stage: ZoneRuleStageEnum
@@ -12546,7 +12649,8 @@ DeviceType.Camera, method(object({
12546
12649
  auth: "admin"
12547
12650
  }), object({
12548
12651
  motion: array(ZoneRuleSchema).readonly(),
12549
- detection: array(ZoneRuleSchema).readonly()
12652
+ detection: array(ZoneRuleSchema).readonly(),
12653
+ package: array(ZoneRuleSchema).readonly()
12550
12654
  });
12551
12655
  var ProviderStatusSchema = object({
12552
12656
  connected: boolean(),
@@ -15729,6 +15833,7 @@ var EventKindIconSchema = _enum([
15729
15833
  "smoke",
15730
15834
  "water",
15731
15835
  "button",
15836
+ "package",
15732
15837
  "generic"
15733
15838
  ]);
15734
15839
  var EventKindCategorySchema = _enum([
@@ -15736,7 +15841,8 @@ var EventKindCategorySchema = _enum([
15736
15841
  "audio",
15737
15842
  "detection",
15738
15843
  "sensor",
15739
- "custom"
15844
+ "custom",
15845
+ "package"
15740
15846
  ]);
15741
15847
  var EventKindDescriptorSchema = object({
15742
15848
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -16077,6 +16183,26 @@ var TrackCascadeCountsSchema = object({
16077
16183
  /** Per-track CLIP search vectors removed (best-effort). */
16078
16184
  embeddings: number().int()
16079
16185
  });
16186
+ /** Event-store footprint for one camera. */
16187
+ var EventStoreDeviceFootprintSchema = object({
16188
+ deviceId: number(),
16189
+ /** Persisted event rows (motion + object + audio) for the camera. */
16190
+ rows: number().int(),
16191
+ /** Event-owned media bytes on disk for the camera. */
16192
+ bytes: number().int()
16193
+ });
16194
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16195
+ var EventStoreFootprintSchema = object({
16196
+ totalRows: number().int(),
16197
+ totalBytes: number().int(),
16198
+ devices: array(EventStoreDeviceFootprintSchema).readonly()
16199
+ });
16200
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16201
+ var EventPruneCountsSchema = object({
16202
+ motion: number().int(),
16203
+ object: number().int(),
16204
+ audio: number().int()
16205
+ });
16080
16206
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
16081
16207
  deviceId: number(),
16082
16208
  trackId: string()
@@ -16140,6 +16266,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16140
16266
  }), {
16141
16267
  kind: "mutation",
16142
16268
  auth: "admin"
16269
+ }), method(object({}), EventStoreFootprintSchema, {
16270
+ kind: "query",
16271
+ auth: "admin"
16272
+ }), method(object({
16273
+ olderThanMs: number(),
16274
+ reason: OpsLogReasonSchema.optional()
16275
+ }), EventPruneCountsSchema, {
16276
+ kind: "mutation",
16277
+ auth: "admin"
16278
+ }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
16279
+ kind: "mutation",
16280
+ auth: "admin"
16281
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
16282
+ kind: "query",
16283
+ auth: "admin"
16143
16284
  }), method(object({
16144
16285
  eventId: string(),
16145
16286
  kind: MediaFileKindEnum.optional()
@@ -19396,13 +19537,131 @@ method(object({
19396
19537
  }), method(object({ deviceId: number() }), RecordingStatusSchema, {
19397
19538
  kind: "mutation",
19398
19539
  auth: "admin"
19399
- }), method(object({ deviceId: number() }), object({
19540
+ }), method(object({
19541
+ deviceId: number(),
19542
+ reason: OpsLogReasonSchema.optional()
19543
+ }), object({
19400
19544
  floorMs: number().nullable(),
19401
19545
  deletedBuckets: number().int(),
19402
19546
  reclaimedBytes: number().int()
19403
19547
  }), {
19404
19548
  kind: "mutation",
19405
19549
  auth: "admin"
19550
+ }), method(object({
19551
+ deviceId: number(),
19552
+ fromMs: number().optional(),
19553
+ toMs: number().optional()
19554
+ }), object({
19555
+ deletedBuckets: number().int(),
19556
+ reclaimedBytes: number().int()
19557
+ }), {
19558
+ kind: "mutation",
19559
+ auth: "admin"
19560
+ }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19561
+ kind: "query",
19562
+ auth: "admin"
19563
+ });
19564
+ /**
19565
+ * `recordingExport` cap — render a footage time range into a single downloadable
19566
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
19567
+ * bounded lifetime with a durable history, auto-expiry, and optional
19568
+ * delete-after-download.
19569
+ *
19570
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
19571
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
19572
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
19573
+ * input and dispatch to that single provider; the render runs on the node that
19574
+ * owns the footage (no cross-node segment transfer). Download rides the
19575
+ * framework addon data-plane. State persists in a DurableState blob (NOT
19576
+ * SQLite); history rows survive file deletion for audit.
19577
+ */
19578
+ /** Playback-speed multiplier for the render (1 = realtime). */
19579
+ var ExportSpeedSchema = number().min(.25).max(32);
19580
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
19581
+ var ExportTimelapseSchema = object({
19582
+ everyMs: number().int().positive(),
19583
+ outputFps: number().int().min(1).max(60).optional()
19584
+ });
19585
+ /**
19586
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
19587
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
19588
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
19589
+ * `deleteAfterDownload` removes it shortly after the first complete download.
19590
+ */
19591
+ var ExportOptionsSchema = object({
19592
+ speed: ExportSpeedSchema.optional(),
19593
+ timelapse: ExportTimelapseSchema.optional(),
19594
+ includeAudio: boolean(),
19595
+ maxLifeMs: number().int().positive(),
19596
+ deleteAfterDownload: boolean(),
19597
+ title: string().max(200).optional()
19598
+ }).superRefine((v, ctx) => {
19599
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
19600
+ code: ZodIssueCode.custom,
19601
+ message: "speed and timelapse are mutually exclusive",
19602
+ path: ["timelapse"]
19603
+ });
19604
+ });
19605
+ var ExportStateSchema = _enum([
19606
+ "queued",
19607
+ "rendering",
19608
+ "ready",
19609
+ "failed",
19610
+ "expired",
19611
+ "deleted"
19612
+ ]);
19613
+ /** One export job / history row. */
19614
+ var ExportRecordSchema = object({
19615
+ id: string(),
19616
+ deviceId: number(),
19617
+ profile: string(),
19618
+ fromMs: number(),
19619
+ toMs: number(),
19620
+ options: ExportOptionsSchema,
19621
+ state: ExportStateSchema,
19622
+ /** 0–100 while rendering; null otherwise. */
19623
+ progressPct: number().nullable(),
19624
+ /** File size once ready; null before. */
19625
+ fileBytes: number().nullable(),
19626
+ expiresAt: number(),
19627
+ deleteAfterDownload: boolean(),
19628
+ /** Epoch of the first complete download; null until then. */
19629
+ downloadedAt: number().nullable(),
19630
+ createdAt: number(),
19631
+ /** User id/name that requested the export. */
19632
+ createdBy: string(),
19633
+ /** Failure reason when state is 'failed'; null otherwise. */
19634
+ error: string().nullable()
19635
+ });
19636
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
19637
+ var ExportDownloadSchema = object({
19638
+ url: string(),
19639
+ endpoints: array(string())
19640
+ });
19641
+ method(object({
19642
+ deviceId: number(),
19643
+ profile: string(),
19644
+ fromMs: number(),
19645
+ toMs: number(),
19646
+ options: ExportOptionsSchema
19647
+ }), ExportRecordSchema, {
19648
+ kind: "mutation",
19649
+ auth: "protected"
19650
+ }), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
19651
+ kind: "query",
19652
+ auth: "protected"
19653
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19654
+ kind: "query",
19655
+ auth: "protected"
19656
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19657
+ kind: "mutation",
19658
+ auth: "protected"
19659
+ }), method(object({ exportId: string() }), ExportRecordSchema, {
19660
+ kind: "mutation",
19661
+ auth: "protected"
19662
+ }), method(object({ exportId: string() }), ExportDownloadSchema, {
19663
+ kind: "query",
19664
+ auth: "protected"
19406
19665
  });
19407
19666
  /**
19408
19667
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -22422,6 +22681,12 @@ Object.freeze({
22422
22681
  addonId: null,
22423
22682
  access: "delete"
22424
22683
  },
22684
+ "pipelineAnalytics.deleteDeviceEvents": {
22685
+ capName: "pipeline-analytics",
22686
+ capScope: "device",
22687
+ addonId: null,
22688
+ access: "delete"
22689
+ },
22425
22690
  "pipelineAnalytics.deleteTracks": {
22426
22691
  capName: "pipeline-analytics",
22427
22692
  capScope: "device",
@@ -22452,6 +22717,12 @@ Object.freeze({
22452
22717
  addonId: null,
22453
22718
  access: "view"
22454
22719
  },
22720
+ "pipelineAnalytics.getEventStoreFootprint": {
22721
+ capName: "pipeline-analytics",
22722
+ capScope: "device",
22723
+ addonId: null,
22724
+ access: "view"
22725
+ },
22455
22726
  "pipelineAnalytics.getKeyEvents": {
22456
22727
  capName: "pipeline-analytics",
22457
22728
  capScope: "device",
@@ -22494,6 +22765,12 @@ Object.freeze({
22494
22765
  addonId: null,
22495
22766
  access: "view"
22496
22767
  },
22768
+ "pipelineAnalytics.listOpsLog": {
22769
+ capName: "pipeline-analytics",
22770
+ capScope: "device",
22771
+ addonId: null,
22772
+ access: "view"
22773
+ },
22497
22774
  "pipelineAnalytics.listRecentTracks": {
22498
22775
  capName: "pipeline-analytics",
22499
22776
  capScope: "device",
@@ -22506,6 +22783,12 @@ Object.freeze({
22506
22783
  addonId: null,
22507
22784
  access: "view"
22508
22785
  },
22786
+ "pipelineAnalytics.pruneEvents": {
22787
+ capName: "pipeline-analytics",
22788
+ capScope: "device",
22789
+ addonId: null,
22790
+ access: "create"
22791
+ },
22509
22792
  "pipelineAnalytics.pruneEventsBefore": {
22510
22793
  capName: "pipeline-analytics",
22511
22794
  capScope: "device",
@@ -23268,6 +23551,12 @@ Object.freeze({
23268
23551
  addonId: null,
23269
23552
  access: "create"
23270
23553
  },
23554
+ "recording.deleteFootprint": {
23555
+ capName: "recording",
23556
+ capScope: "system",
23557
+ addonId: null,
23558
+ access: "delete"
23559
+ },
23271
23560
  "recording.getAvailability": {
23272
23561
  capName: "recording",
23273
23562
  capScope: "system",
@@ -23298,6 +23587,12 @@ Object.freeze({
23298
23587
  addonId: null,
23299
23588
  access: "view"
23300
23589
  },
23590
+ "recording.listOpsLog": {
23591
+ capName: "recording",
23592
+ capScope: "system",
23593
+ addonId: null,
23594
+ access: "view"
23595
+ },
23301
23596
  "recording.locateSegment": {
23302
23597
  capName: "recording",
23303
23598
  capScope: "system",
@@ -23328,6 +23623,42 @@ Object.freeze({
23328
23623
  addonId: null,
23329
23624
  access: "create"
23330
23625
  },
23626
+ "recordingExport.cancelExport": {
23627
+ capName: "recordingExport",
23628
+ capScope: "system",
23629
+ addonId: null,
23630
+ access: "create"
23631
+ },
23632
+ "recordingExport.createExport": {
23633
+ capName: "recordingExport",
23634
+ capScope: "system",
23635
+ addonId: null,
23636
+ access: "create"
23637
+ },
23638
+ "recordingExport.deleteExport": {
23639
+ capName: "recordingExport",
23640
+ capScope: "system",
23641
+ addonId: null,
23642
+ access: "delete"
23643
+ },
23644
+ "recordingExport.getDownloadUrl": {
23645
+ capName: "recordingExport",
23646
+ capScope: "system",
23647
+ addonId: null,
23648
+ access: "view"
23649
+ },
23650
+ "recordingExport.getExport": {
23651
+ capName: "recordingExport",
23652
+ capScope: "system",
23653
+ addonId: null,
23654
+ access: "view"
23655
+ },
23656
+ "recordingExport.listExports": {
23657
+ capName: "recordingExport",
23658
+ capScope: "system",
23659
+ addonId: null,
23660
+ access: "view"
23661
+ },
23331
23662
  "sceneMonitor.captureReference": {
23332
23663
  capName: "scene-monitor",
23333
23664
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",