@camstack/addon-static-turn 1.1.23 → 1.1.25

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-CFZs3jI4.mjs
2
+ //#region ../types/dist/event-category-H4AVePnn.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -149,6 +149,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
149
149
  EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
150
150
  EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
151
151
  EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
152
+ /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
153
+ * thumb is a scrub gap the recorder's keyframe backfill covers. */
154
+ EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
152
155
  EventCategory["DetectionEvent"] = "detection.event";
153
156
  EventCategory["SessionTrackNew"] = "session.track.new";
154
157
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -7218,6 +7221,24 @@ var RecordingRetentionSchema = object({
7218
7221
  maxSizeGb: number().min(0).optional()
7219
7222
  });
7220
7223
  /**
7224
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7225
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7226
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7227
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7228
+ *
7229
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7230
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7231
+ * preset changed over time renders every historical window at the dims it was
7232
+ * written with.
7233
+ */
7234
+ var ScrubThumbnailPresetSchema = _enum([
7235
+ "minimal",
7236
+ "low",
7237
+ "standard",
7238
+ "high",
7239
+ "max"
7240
+ ]);
7241
+ /**
7221
7242
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7222
7243
  *
7223
7244
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7254,7 +7275,14 @@ var RecordingConfigSchema = object({
7254
7275
  * derived into bands once via `migrateConfigToBands`.
7255
7276
  */
7256
7277
  bands: array(RecordingBandSchema).optional(),
7257
- retention: RecordingRetentionSchema.optional()
7278
+ retention: RecordingRetentionSchema.optional(),
7279
+ /**
7280
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7281
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7282
+ * windows only — existing sheets are immutable, and each window's index
7283
+ * carries its own tile dims so mixed-preset history renders correctly.
7284
+ */
7285
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7258
7286
  });
7259
7287
  /**
7260
7288
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -9813,7 +9841,7 @@ object({
9813
9841
  deviceId: number(),
9814
9842
  timestamp: number()
9815
9843
  });
9816
- DeviceType.Button;
9844
+ DeviceType.Button, DeviceType.Camera;
9817
9845
  /**
9818
9846
  * Enum-state sensor — a string value picked from a finite option set.
9819
9847
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -14183,6 +14211,14 @@ var ConfigEntrySchema = object({
14183
14211
  value: unknown(),
14184
14212
  description: string().optional()
14185
14213
  });
14214
+ var DeviceLinkModeSchema = _enum(["auto", "manual"]);
14215
+ /** One resolved linked device — the compact projection consumers need. */
14216
+ var LinkedDeviceSchema = object({
14217
+ deviceId: number(),
14218
+ name: string(),
14219
+ location: string().nullable(),
14220
+ features: array(string())
14221
+ });
14186
14222
  var SavedDeviceRowSchema = object({
14187
14223
  /** Numeric id reserved at allocateDeviceId time. */
14188
14224
  id: number(),
@@ -14404,7 +14440,10 @@ method(object({
14404
14440
  }), _void(), {
14405
14441
  kind: "mutation",
14406
14442
  auth: "admin"
14407
- }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
14443
+ }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
14444
+ mode: DeviceLinkModeSchema,
14445
+ devices: array(LinkedDeviceSchema)
14446
+ })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
14408
14447
  deviceId: number(),
14409
14448
  values: record(string(), unknown())
14410
14449
  }), object({ success: literal(true) }), {
@@ -15673,6 +15712,61 @@ var EventKindSchema = _enum([
15673
15712
  "object",
15674
15713
  "audio"
15675
15714
  ]);
15715
+ /**
15716
+ * Spatial filter for `listTracks` — the rect + polygon variants of the shared
15717
+ * MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
15718
+ * of the camera frame (top-left origin), matching the drawing-plane editor.
15719
+ */
15720
+ var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
15721
+ /** Closed icon vocabulary so clients render a known glyph per kind. */
15722
+ var EventKindIconSchema = _enum([
15723
+ "motion",
15724
+ "audio",
15725
+ "person",
15726
+ "vehicle",
15727
+ "animal",
15728
+ "door",
15729
+ "pir",
15730
+ "smoke",
15731
+ "water",
15732
+ "button",
15733
+ "generic"
15734
+ ]);
15735
+ var EventKindCategorySchema = _enum([
15736
+ "motion",
15737
+ "audio",
15738
+ "detection",
15739
+ "sensor",
15740
+ "custom"
15741
+ ]);
15742
+ var EventKindDescriptorSchema = object({
15743
+ /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
15744
+ kind: string(),
15745
+ label: string(),
15746
+ /** Hex color for timeline/legend rendering. */
15747
+ color: string(),
15748
+ icon: EventKindIconSchema,
15749
+ category: EventKindCategorySchema,
15750
+ /** Which cap + device contributes this kind. For built-ins the camera
15751
+ * itself; for sensor kinds the LINKED source device. */
15752
+ source: object({
15753
+ capName: string(),
15754
+ deviceId: number()
15755
+ })
15756
+ });
15757
+ var SensorEventSchema = object({
15758
+ id: string(),
15759
+ /** The CAMERA the event is attributed to (a sensor linked to N cameras
15760
+ * yields N rows, one per camera). */
15761
+ deviceId: number(),
15762
+ /** The linked sensor device whose state changed. */
15763
+ sourceDeviceId: number(),
15764
+ /** Event kind id — matches an `EventKindDescriptor.kind`. */
15765
+ kind: string(),
15766
+ /** Snapshot of the sensor cap's runtime-state slice at the change. */
15767
+ value: record(string(), unknown()).nullable(),
15768
+ timestamp: number()
15769
+ });
15676
15770
  var TrackPositionSchema = object({
15677
15771
  x: number(),
15678
15772
  y: number(),
@@ -15686,6 +15780,30 @@ var TrackSnapshotSchema = object({
15686
15780
  mediaKey: string()
15687
15781
  });
15688
15782
  /**
15783
+ * Normalized 0..1 trajectory envelope (min/max over every position bbox,
15784
+ * divided by the track's detection-frame dims), computed at persist time.
15785
+ * Absent when the frame dims were unknown when the track was persisted
15786
+ * (legacy rows / dims-less sources) and on active (in-RAM) tracks.
15787
+ */
15788
+ var TrackEnvelopeSchema = object({
15789
+ minX: number(),
15790
+ minY: number(),
15791
+ maxX: number(),
15792
+ maxY: number()
15793
+ });
15794
+ /**
15795
+ * Row projection for track list queries. `full` (default) returns the
15796
+ * complete Track including the frame-rate `positions[]` history and the
15797
+ * `snapshots[]` references — megabytes across a page of tracks. `slim`
15798
+ * keeps every scalar the list surfaces actually render (ids, class(es),
15799
+ * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15800
+ * zonesVisited, bestEventId, envelope) and returns `positions` /
15801
+ * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15802
+ * `getTrack`. Mirrors the event-store `projection` convention
15803
+ * (`getObjectEvents` et al.).
15804
+ */
15805
+ var TrackProjectionSchema = _enum(["full", "slim"]);
15806
+ /**
15689
15807
  * One audio-classification label heard on the track's camera while the
15690
15808
  * track was alive, aggregated per label. An "episode" is one persisted
15691
15809
  * audio event (the confident-classification path: score ≥ the device's
@@ -15736,7 +15854,11 @@ var TrackSchema = object({
15736
15854
  /** Audio-classification labels heard on the camera during the track's
15737
15855
  * life (score ≥ device `classificationMinScore`), aggregated per label.
15738
15856
  * Absent on legacy rows / tracks with no confident audio. */
15739
- audioLabels: array(TrackAudioLabelSchema).readonly().optional()
15857
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
15858
+ /** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
15859
+ * Populated from the persisted envelope columns on historical reads;
15860
+ * absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
15861
+ envelope: TrackEnvelopeSchema.optional()
15740
15862
  });
15741
15863
  var BaseEventFields = {
15742
15864
  id: string(),
@@ -15846,11 +15968,13 @@ var MediaFileSchema = object({
15846
15968
  sizeBytes: number(),
15847
15969
  timestamp: number()
15848
15970
  });
15971
+ var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
15972
+ var MAX_EVENT_QUERY_LIMIT = 5e3;
15849
15973
  var DeviceEventQueryInput = object({
15850
15974
  deviceId: number(),
15851
15975
  since: number().optional(),
15852
15976
  until: number().optional(),
15853
- limit: number().int().min(1).max(5e3).default(1e3),
15977
+ limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
15854
15978
  /** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
15855
15979
  * optional `mediaUrl` (populated by B5). `full` (default) keeps today's
15856
15980
  * exact behaviour. Callers may omit this field — the store defaults to
@@ -15858,6 +15982,27 @@ var DeviceEventQueryInput = object({
15858
15982
  projection: _enum(["full", "slim"]).optional()
15859
15983
  });
15860
15984
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15985
+ var RecentTracksQueryInput = object({
15986
+ /** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
15987
+ deviceIds: array(number()),
15988
+ /** Window lower bound on `lastSeen` (inclusive). */
15989
+ since: number().optional(),
15990
+ /** Window upper bound on `lastSeen` (inclusive). */
15991
+ until: number().optional(),
15992
+ /** Page size. Default 200, max 1000. */
15993
+ limit: number().int().min(1).max(1e3).default(200),
15994
+ /** Opaque continuation cursor from a previous page's `nextCursor`.
15995
+ * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
15996
+ cursor: string().optional(),
15997
+ /** See {@link TrackProjectionSchema}. Default `full`. */
15998
+ projection: TrackProjectionSchema.optional()
15999
+ });
16000
+ var RecentTracksPageSchema = object({
16001
+ /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
16002
+ tracks: array(TrackSchema).readonly(),
16003
+ /** Cursor for the next page, or null when this page is the last. */
16004
+ nextCursor: string().nullable()
16005
+ });
15861
16006
  var KeyEventQueryInput = object({
15862
16007
  deviceId: number(),
15863
16008
  /** Window lower bound (track firstSeen ≥ since). */
@@ -15940,11 +16085,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15940
16085
  deviceId: number(),
15941
16086
  since: number().optional(),
15942
16087
  until: number().optional(),
15943
- limit: number().optional()
15944
- }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15945
- kind: "mutation",
15946
- auth: "admin"
15947
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
16088
+ limit: number().optional(),
16089
+ /** Spatial filter only tracks whose trajectory intersects the zone
16090
+ * (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
16091
+ * envelope columns, then precisely tested per position. Tracks with
16092
+ * an unknown envelope (no frame dims at persist time) always match. */
16093
+ zone: TrackZoneFilterSchema.optional(),
16094
+ /** See {@link TrackProjectionSchema}. Default `full` (backward
16095
+ * compatible — omitting the field keeps today's exact behaviour). */
16096
+ projection: TrackProjectionSchema.optional()
16097
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16098
+ kind: "mutation",
16099
+ auth: "admin"
16100
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
16101
+ deviceId: number(),
16102
+ since: number().optional(),
16103
+ until: number().optional(),
16104
+ kinds: array(string()).optional(),
16105
+ limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
16106
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15948
16107
  deviceId: number(),
15949
16108
  since: number(),
15950
16109
  until: number(),
@@ -19168,7 +19327,12 @@ var RecordingStorageUsageSchema = object({
19168
19327
  /**
19169
19328
  * Result of locating footage at a wall-clock instant for one device/profile.
19170
19329
  * `segment` carries the covering segment's window; `gap` reports the forward
19171
- * nearest covered edge (`null` past the end of footage / when none exists).
19330
+ * nearest covered edge (`null` past the end of footage / when none exists)
19331
+ * and the backward covered edge `prevEndMs` (exclusive end of the nearest
19332
+ * footage behind the epoch; `null` when none — optional so older providers
19333
+ * that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
19334
+ * small inter-segment cracks (durMs under-covers the span to the next
19335
+ * startMs by ~11-17 ms) instead of no-opping at a segment head.
19172
19336
  */
19173
19337
  var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
19174
19338
  kind: literal("segment"),
@@ -19177,7 +19341,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
19177
19341
  bytes: number()
19178
19342
  }), object({
19179
19343
  kind: literal("gap"),
19180
- nearestEdgeMs: number().nullable()
19344
+ nearestEdgeMs: number().nullable(),
19345
+ prevEndMs: number().nullable().optional()
19181
19346
  })]);
19182
19347
  /** Raw bytes of one finalized footage segment (read off disk on the recording node). */
19183
19348
  var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
@@ -20746,6 +20911,12 @@ Object.freeze({
20746
20911
  addonId: null,
20747
20912
  access: "view"
20748
20913
  },
20914
+ "deviceManager.getLinkedDevices": {
20915
+ capName: "device-manager",
20916
+ capScope: "system",
20917
+ addonId: null,
20918
+ access: "view"
20919
+ },
20749
20920
  "deviceManager.getRoleDisplayDefaults": {
20750
20921
  capName: "device-manager",
20751
20922
  capScope: "system",
@@ -22300,6 +22471,12 @@ Object.freeze({
22300
22471
  addonId: null,
22301
22472
  access: "view"
22302
22473
  },
22474
+ "pipelineAnalytics.getSensorEvents": {
22475
+ capName: "pipeline-analytics",
22476
+ capScope: "device",
22477
+ addonId: null,
22478
+ access: "view"
22479
+ },
22303
22480
  "pipelineAnalytics.getTrack": {
22304
22481
  capName: "pipeline-analytics",
22305
22482
  capScope: "device",
@@ -22312,6 +22489,18 @@ Object.freeze({
22312
22489
  addonId: null,
22313
22490
  access: "view"
22314
22491
  },
22492
+ "pipelineAnalytics.listEventKinds": {
22493
+ capName: "pipeline-analytics",
22494
+ capScope: "device",
22495
+ addonId: null,
22496
+ access: "view"
22497
+ },
22498
+ "pipelineAnalytics.listRecentTracks": {
22499
+ capName: "pipeline-analytics",
22500
+ capScope: "device",
22501
+ addonId: null,
22502
+ access: "view"
22503
+ },
22315
22504
  "pipelineAnalytics.listTracks": {
22316
22505
  capName: "pipeline-analytics",
22317
22506
  capScope: "device",
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-CFZs3jI4.mjs
1
+ //#region ../types/dist/event-category-H4AVePnn.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -148,6 +148,9 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
148
148
  EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
149
149
  EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
150
150
  EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
151
+ /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
152
+ * thumb is a scrub gap the recorder's keyframe backfill covers. */
153
+ EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
151
154
  EventCategory["DetectionEvent"] = "detection.event";
152
155
  EventCategory["SessionTrackNew"] = "session.track.new";
153
156
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -7217,6 +7220,24 @@ var RecordingRetentionSchema = object({
7217
7220
  maxSizeGb: number().min(0).optional()
7218
7221
  });
7219
7222
  /**
7223
+ * Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
7224
+ * sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
7225
+ * previews at. Five graduated steps; absent on a config = `standard` (the
7226
+ * shipped default, matching `sheet-geometry`/`sheet-composer`).
7227
+ *
7228
+ * Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
7229
+ * Each window's index sidecar carries its own tile dims, so a camera whose
7230
+ * preset changed over time renders every historical window at the dims it was
7231
+ * written with.
7232
+ */
7233
+ var ScrubThumbnailPresetSchema = _enum([
7234
+ "minimal",
7235
+ "low",
7236
+ "standard",
7237
+ "high",
7238
+ "max"
7239
+ ]);
7240
+ /**
7220
7241
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7221
7242
  *
7222
7243
  * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
@@ -7253,7 +7274,14 @@ var RecordingConfigSchema = object({
7253
7274
  * derived into bands once via `migrateConfigToBands`.
7254
7275
  */
7255
7276
  bands: array(RecordingBandSchema).optional(),
7256
- retention: RecordingRetentionSchema.optional()
7277
+ retention: RecordingRetentionSchema.optional(),
7278
+ /**
7279
+ * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
7280
+ * timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
7281
+ * windows only — existing sheets are immutable, and each window's index
7282
+ * carries its own tile dims so mixed-preset history renders correctly.
7283
+ */
7284
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7257
7285
  });
7258
7286
  /**
7259
7287
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -9812,7 +9840,7 @@ object({
9812
9840
  deviceId: number(),
9813
9841
  timestamp: number()
9814
9842
  });
9815
- DeviceType.Button;
9843
+ DeviceType.Button, DeviceType.Camera;
9816
9844
  /**
9817
9845
  * Enum-state sensor — a string value picked from a finite option set.
9818
9846
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -14182,6 +14210,14 @@ var ConfigEntrySchema = object({
14182
14210
  value: unknown(),
14183
14211
  description: string().optional()
14184
14212
  });
14213
+ var DeviceLinkModeSchema = _enum(["auto", "manual"]);
14214
+ /** One resolved linked device — the compact projection consumers need. */
14215
+ var LinkedDeviceSchema = object({
14216
+ deviceId: number(),
14217
+ name: string(),
14218
+ location: string().nullable(),
14219
+ features: array(string())
14220
+ });
14185
14221
  var SavedDeviceRowSchema = object({
14186
14222
  /** Numeric id reserved at allocateDeviceId time. */
14187
14223
  id: number(),
@@ -14403,7 +14439,10 @@ method(object({
14403
14439
  }), _void(), {
14404
14440
  kind: "mutation",
14405
14441
  auth: "admin"
14406
- }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
14442
+ }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), object({
14443
+ mode: DeviceLinkModeSchema,
14444
+ devices: array(LinkedDeviceSchema)
14445
+ })), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
14407
14446
  deviceId: number(),
14408
14447
  values: record(string(), unknown())
14409
14448
  }), object({ success: literal(true) }), {
@@ -15672,6 +15711,61 @@ var EventKindSchema = _enum([
15672
15711
  "object",
15673
15712
  "audio"
15674
15713
  ]);
15714
+ /**
15715
+ * Spatial filter for `listTracks` — the rect + polygon variants of the shared
15716
+ * MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
15717
+ * of the camera frame (top-left origin), matching the drawing-plane editor.
15718
+ */
15719
+ var TrackZoneFilterSchema = discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
15720
+ /** Closed icon vocabulary so clients render a known glyph per kind. */
15721
+ var EventKindIconSchema = _enum([
15722
+ "motion",
15723
+ "audio",
15724
+ "person",
15725
+ "vehicle",
15726
+ "animal",
15727
+ "door",
15728
+ "pir",
15729
+ "smoke",
15730
+ "water",
15731
+ "button",
15732
+ "generic"
15733
+ ]);
15734
+ var EventKindCategorySchema = _enum([
15735
+ "motion",
15736
+ "audio",
15737
+ "detection",
15738
+ "sensor",
15739
+ "custom"
15740
+ ]);
15741
+ var EventKindDescriptorSchema = object({
15742
+ /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
15743
+ kind: string(),
15744
+ label: string(),
15745
+ /** Hex color for timeline/legend rendering. */
15746
+ color: string(),
15747
+ icon: EventKindIconSchema,
15748
+ category: EventKindCategorySchema,
15749
+ /** Which cap + device contributes this kind. For built-ins the camera
15750
+ * itself; for sensor kinds the LINKED source device. */
15751
+ source: object({
15752
+ capName: string(),
15753
+ deviceId: number()
15754
+ })
15755
+ });
15756
+ var SensorEventSchema = object({
15757
+ id: string(),
15758
+ /** The CAMERA the event is attributed to (a sensor linked to N cameras
15759
+ * yields N rows, one per camera). */
15760
+ deviceId: number(),
15761
+ /** The linked sensor device whose state changed. */
15762
+ sourceDeviceId: number(),
15763
+ /** Event kind id — matches an `EventKindDescriptor.kind`. */
15764
+ kind: string(),
15765
+ /** Snapshot of the sensor cap's runtime-state slice at the change. */
15766
+ value: record(string(), unknown()).nullable(),
15767
+ timestamp: number()
15768
+ });
15675
15769
  var TrackPositionSchema = object({
15676
15770
  x: number(),
15677
15771
  y: number(),
@@ -15685,6 +15779,30 @@ var TrackSnapshotSchema = object({
15685
15779
  mediaKey: string()
15686
15780
  });
15687
15781
  /**
15782
+ * Normalized 0..1 trajectory envelope (min/max over every position bbox,
15783
+ * divided by the track's detection-frame dims), computed at persist time.
15784
+ * Absent when the frame dims were unknown when the track was persisted
15785
+ * (legacy rows / dims-less sources) and on active (in-RAM) tracks.
15786
+ */
15787
+ var TrackEnvelopeSchema = object({
15788
+ minX: number(),
15789
+ minY: number(),
15790
+ maxX: number(),
15791
+ maxY: number()
15792
+ });
15793
+ /**
15794
+ * Row projection for track list queries. `full` (default) returns the
15795
+ * complete Track including the frame-rate `positions[]` history and the
15796
+ * `snapshots[]` references — megabytes across a page of tracks. `slim`
15797
+ * keeps every scalar the list surfaces actually render (ids, class(es),
15798
+ * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15799
+ * zonesVisited, bestEventId, envelope) and returns `positions` /
15800
+ * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15801
+ * `getTrack`. Mirrors the event-store `projection` convention
15802
+ * (`getObjectEvents` et al.).
15803
+ */
15804
+ var TrackProjectionSchema = _enum(["full", "slim"]);
15805
+ /**
15688
15806
  * One audio-classification label heard on the track's camera while the
15689
15807
  * track was alive, aggregated per label. An "episode" is one persisted
15690
15808
  * audio event (the confident-classification path: score ≥ the device's
@@ -15735,7 +15853,11 @@ var TrackSchema = object({
15735
15853
  /** Audio-classification labels heard on the camera during the track's
15736
15854
  * life (score ≥ device `classificationMinScore`), aggregated per label.
15737
15855
  * Absent on legacy rows / tracks with no confident audio. */
15738
- audioLabels: array(TrackAudioLabelSchema).readonly().optional()
15856
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
15857
+ /** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
15858
+ * Populated from the persisted envelope columns on historical reads;
15859
+ * absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
15860
+ envelope: TrackEnvelopeSchema.optional()
15739
15861
  });
15740
15862
  var BaseEventFields = {
15741
15863
  id: string(),
@@ -15845,11 +15967,13 @@ var MediaFileSchema = object({
15845
15967
  sizeBytes: number(),
15846
15968
  timestamp: number()
15847
15969
  });
15970
+ var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
15971
+ var MAX_EVENT_QUERY_LIMIT = 5e3;
15848
15972
  var DeviceEventQueryInput = object({
15849
15973
  deviceId: number(),
15850
15974
  since: number().optional(),
15851
15975
  until: number().optional(),
15852
- limit: number().int().min(1).max(5e3).default(1e3),
15976
+ limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
15853
15977
  /** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
15854
15978
  * optional `mediaUrl` (populated by B5). `full` (default) keeps today's
15855
15979
  * exact behaviour. Callers may omit this field — the store defaults to
@@ -15857,6 +15981,27 @@ var DeviceEventQueryInput = object({
15857
15981
  projection: _enum(["full", "slim"]).optional()
15858
15982
  });
15859
15983
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15984
+ var RecentTracksQueryInput = object({
15985
+ /** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
15986
+ deviceIds: array(number()),
15987
+ /** Window lower bound on `lastSeen` (inclusive). */
15988
+ since: number().optional(),
15989
+ /** Window upper bound on `lastSeen` (inclusive). */
15990
+ until: number().optional(),
15991
+ /** Page size. Default 200, max 1000. */
15992
+ limit: number().int().min(1).max(1e3).default(200),
15993
+ /** Opaque continuation cursor from a previous page's `nextCursor`.
15994
+ * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
15995
+ cursor: string().optional(),
15996
+ /** See {@link TrackProjectionSchema}. Default `full`. */
15997
+ projection: TrackProjectionSchema.optional()
15998
+ });
15999
+ var RecentTracksPageSchema = object({
16000
+ /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
16001
+ tracks: array(TrackSchema).readonly(),
16002
+ /** Cursor for the next page, or null when this page is the last. */
16003
+ nextCursor: string().nullable()
16004
+ });
15860
16005
  var KeyEventQueryInput = object({
15861
16006
  deviceId: number(),
15862
16007
  /** Window lower bound (track firstSeen ≥ since). */
@@ -15939,11 +16084,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15939
16084
  deviceId: number(),
15940
16085
  since: number().optional(),
15941
16086
  until: number().optional(),
15942
- limit: number().optional()
15943
- }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15944
- kind: "mutation",
15945
- auth: "admin"
15946
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
16087
+ limit: number().optional(),
16088
+ /** Spatial filter only tracks whose trajectory intersects the zone
16089
+ * (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
16090
+ * envelope columns, then precisely tested per position. Tracks with
16091
+ * an unknown envelope (no frame dims at persist time) always match. */
16092
+ zone: TrackZoneFilterSchema.optional(),
16093
+ /** See {@link TrackProjectionSchema}. Default `full` (backward
16094
+ * compatible — omitting the field keeps today's exact behaviour). */
16095
+ projection: TrackProjectionSchema.optional()
16096
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16097
+ kind: "mutation",
16098
+ auth: "admin"
16099
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({
16100
+ deviceId: number(),
16101
+ since: number().optional(),
16102
+ until: number().optional(),
16103
+ kinds: array(string()).optional(),
16104
+ limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
16105
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15947
16106
  deviceId: number(),
15948
16107
  since: number(),
15949
16108
  until: number(),
@@ -19167,7 +19326,12 @@ var RecordingStorageUsageSchema = object({
19167
19326
  /**
19168
19327
  * Result of locating footage at a wall-clock instant for one device/profile.
19169
19328
  * `segment` carries the covering segment's window; `gap` reports the forward
19170
- * nearest covered edge (`null` past the end of footage / when none exists).
19329
+ * nearest covered edge (`null` past the end of footage / when none exists)
19330
+ * and the backward covered edge `prevEndMs` (exclusive end of the nearest
19331
+ * footage behind the epoch; `null` when none — optional so older providers
19332
+ * that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
19333
+ * small inter-segment cracks (durMs under-covers the span to the next
19334
+ * startMs by ~11-17 ms) instead of no-opping at a segment head.
19171
19335
  */
19172
19336
  var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
19173
19337
  kind: literal("segment"),
@@ -19176,7 +19340,8 @@ var LocateSegmentResultSchema = discriminatedUnion("kind", [object({
19176
19340
  bytes: number()
19177
19341
  }), object({
19178
19342
  kind: literal("gap"),
19179
- nearestEdgeMs: number().nullable()
19343
+ nearestEdgeMs: number().nullable(),
19344
+ prevEndMs: number().nullable().optional()
19180
19345
  })]);
19181
19346
  /** Raw bytes of one finalized footage segment (read off disk on the recording node). */
19182
19347
  var ReadSegmentBytesResultSchema = object({ data: _instanceof(Uint8Array) });
@@ -20745,6 +20910,12 @@ Object.freeze({
20745
20910
  addonId: null,
20746
20911
  access: "view"
20747
20912
  },
20913
+ "deviceManager.getLinkedDevices": {
20914
+ capName: "device-manager",
20915
+ capScope: "system",
20916
+ addonId: null,
20917
+ access: "view"
20918
+ },
20748
20919
  "deviceManager.getRoleDisplayDefaults": {
20749
20920
  capName: "device-manager",
20750
20921
  capScope: "system",
@@ -22299,6 +22470,12 @@ Object.freeze({
22299
22470
  addonId: null,
22300
22471
  access: "view"
22301
22472
  },
22473
+ "pipelineAnalytics.getSensorEvents": {
22474
+ capName: "pipeline-analytics",
22475
+ capScope: "device",
22476
+ addonId: null,
22477
+ access: "view"
22478
+ },
22302
22479
  "pipelineAnalytics.getTrack": {
22303
22480
  capName: "pipeline-analytics",
22304
22481
  capScope: "device",
@@ -22311,6 +22488,18 @@ Object.freeze({
22311
22488
  addonId: null,
22312
22489
  access: "view"
22313
22490
  },
22491
+ "pipelineAnalytics.listEventKinds": {
22492
+ capName: "pipeline-analytics",
22493
+ capScope: "device",
22494
+ addonId: null,
22495
+ access: "view"
22496
+ },
22497
+ "pipelineAnalytics.listRecentTracks": {
22498
+ capName: "pipeline-analytics",
22499
+ capScope: "device",
22500
+ addonId: null,
22501
+ access: "view"
22502
+ },
22314
22503
  "pipelineAnalytics.listTracks": {
22315
22504
  capName: "pipeline-analytics",
22316
22505
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",