@camstack/types 1.1.45 → 1.1.47

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.
@@ -265,7 +265,7 @@ export interface DeviceProxy {
265
265
  readonly cameraPipelineConfig: Pick<InferDeviceProxyCap<typeof cameraPipelineConfigCapability>, 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
266
266
  readonly deviceAdoption: Pick<InferDeviceProxyCap<typeof deviceAdoptionCapability>, 'getStatus'>;
267
267
  readonly deviceExport: Pick<InferDeviceProxyCap<typeof deviceExportCapability>, 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
268
- readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setLocation' | 'setType' | 'setIntegrationId' | 'setLinkDeviceId' | 'setPrimaryChildEntityId' | 'setChildLayout' | 'setDeviceLinks' | 'setDisplay' | 'getWireableFields' | 'setRole' | 'applyInitialMeta' | 'setMetadata' | 'setDisabled' | 'getDevice' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'getAllBindings' | 'setWrapperActive' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'runDeviceAction' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate'>;
268
+ readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setLocation' | 'setType' | 'setIntegrationId' | 'setLinkDeviceId' | 'setPrimaryChildEntityId' | 'setChildLayout' | 'setDeviceLinks' | 'setDisplay' | 'getWireableFields' | 'setRole' | 'applyInitialMeta' | 'setMetadata' | 'setDisabled' | 'getDevice' | 'getLinkedDevices' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'getAllBindings' | 'setWrapperActive' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'runDeviceAction' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
269
269
  readonly deviceState: Pick<InferDeviceProxyCap<typeof deviceStateCapability>, 'getSnapshot' | 'getCapSlice' | 'setCapSlice'>;
270
270
  readonly faceGallery: Pick<InferDeviceProxyCap<typeof faceGalleryCapability>, 'getFaceByTrack'>;
271
271
  readonly networkQuality: Pick<InferDeviceProxyCap<typeof networkQualityCapability>, 'getDeviceStats' | 'reportClientStats'>;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 785 method paths across 115 capabilities.
9
+ * Coverage: 789 method paths across 115 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-BdhADtqT.js");
2
+ const require_sleep = require("./sleep-BkhAiFKX.js");
3
+ const require_event_category = require("./event-category-AkBNxg_X.js");
4
+ const require_enums = require("./enums.js");
3
5
  const require_err_msg = require("./err-msg-COpsHMw2.js");
4
6
  let zod = require("zod");
5
7
  //#region src/health/wiring-health.ts
@@ -1479,16 +1481,6 @@ var DEFAULT_RETENTION = {
1479
1481
  snapshotsDays: 14
1480
1482
  };
1481
1483
  //#endregion
1482
- //#region src/enums/event-source-type.ts
1483
- var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
1484
- EventSourceType["Addon"] = "addon";
1485
- EventSourceType["Core"] = "core";
1486
- EventSourceType["Device"] = "device";
1487
- EventSourceType["Provider"] = "provider";
1488
- EventSourceType["System"] = "system";
1489
- return EventSourceType;
1490
- }({});
1491
- //#endregion
1492
1484
  //#region src/constants.ts
1493
1485
  var HF_REPO = "camstack/camstack-models";
1494
1486
  var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
@@ -6495,10 +6487,23 @@ var deviceDiscoveryCapability = {
6495
6487
  //#endregion
6496
6488
  //#region src/capabilities/doorbell.cap.ts
6497
6489
  /**
6498
- * Doorbell button cap. Installed on a `DeviceType.Button` accessory
6499
- * with `role: DeviceRole.Doorbell`. Emits an `onPressed` event every
6500
- * time the firmware pushes a ring; status tracks the last press and
6501
- * a pressCount since start (diagnostic).
6490
+ * Doorbell button cap. Two kinds of providers coexist behind this cap
6491
+ * name (same pattern as `snapshot`):
6492
+ *
6493
+ * - **Native** providers: registered per-device by device-driver
6494
+ * addons via `ctx.registerNativeCap` — either on a
6495
+ * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
6496
+ * or directly on the camera (Reolink registers at camera level).
6497
+ * Emits an `onPressed` event every time the firmware pushes a
6498
+ * ring; status tracks the last press and a pressCount since start
6499
+ * (diagnostic).
6500
+ *
6501
+ * - **Wrapper** provider: the `virtual-doorbell` system builtin
6502
+ * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
6503
+ * device (contact / switch / event-emitter …) into a doorbell for
6504
+ * a camera. `defaultActive: false` — the operator explicitly binds
6505
+ * it per camera in the device-bindings UI, then picks the source
6506
+ * device + trigger in the per-device settings.
6502
6507
  *
6503
6508
  * The DeviceEventPropagator re-emits `onPressed` on the camera parent
6504
6509
  * — subscribers listening at the camera level receive ring events
@@ -6519,7 +6524,10 @@ var doorbellCapability = {
6519
6524
  scope: "device",
6520
6525
  deviceNative: true,
6521
6526
  mode: "singleton",
6522
- deviceTypes: [require_sleep.DeviceType.Button],
6527
+ kind: "wrapper",
6528
+ defaultActive: false,
6529
+ deviceTypes: [require_sleep.DeviceType.Button, require_sleep.DeviceType.Camera],
6530
+ exposesDeviceSettings: true,
6523
6531
  methods: {},
6524
6532
  events: {
6525
6533
  /**
@@ -16066,6 +16074,14 @@ var ConfigEntrySchema = zod.z.object({
16066
16074
  value: zod.z.unknown(),
16067
16075
  description: zod.z.string().optional()
16068
16076
  });
16077
+ var DeviceLinkModeSchema = zod.z.enum(["auto", "manual"]);
16078
+ /** One resolved linked device — the compact projection consumers need. */
16079
+ var LinkedDeviceSchema = zod.z.object({
16080
+ deviceId: zod.z.number(),
16081
+ name: zod.z.string(),
16082
+ location: zod.z.string().nullable(),
16083
+ features: zod.z.array(zod.z.string())
16084
+ });
16069
16085
  var SavedDeviceRowSchema = zod.z.object({
16070
16086
  /** Numeric id reserved at allocateDeviceId time. */
16071
16087
  id: zod.z.number(),
@@ -16173,6 +16189,7 @@ var deviceManagerCapability = {
16173
16189
  name: "device-manager",
16174
16190
  scope: "system",
16175
16191
  mode: "singleton",
16192
+ exposesDeviceSettings: true,
16176
16193
  methods: {
16177
16194
  /** Reserve (or re-resolve) a progressive numeric id for `(addonId, stableId)`.
16178
16195
  * Idempotent: returns the existing id if one is already persisted for the
@@ -16423,6 +16440,19 @@ var deviceManagerCapability = {
16423
16440
  getDevice: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), DeviceInfoSchema.nullable()),
16424
16441
  /** List children of a parent device (by parent numeric id). */
16425
16442
  getChildren: require_sleep.method(zod.z.object({ parentDeviceId: zod.z.number() }), zod.z.array(DeviceInfoSchema)),
16443
+ /**
16444
+ * Resolve the devices LINKED to a camera — the single policy authority
16445
+ * both consumers call (viewer devices panel + pipeline-analytics event
16446
+ * kinds/ingest). Device-tree children are ALWAYS included; mode 'auto'
16447
+ * (default) adds every device sharing the camera's non-null `location`,
16448
+ * mode 'manual' adds the persisted manual list instead. Excludes the
16449
+ * camera itself; deduped. Configuration is standard per-device settings
16450
+ * (see the module docblock) — there are no bespoke link mutations.
16451
+ */
16452
+ getLinkedDevices: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({
16453
+ mode: DeviceLinkModeSchema,
16454
+ devices: zod.z.array(LinkedDeviceSchema)
16455
+ })),
16426
16456
  /** Get stream sources for a camera device. */
16427
16457
  getStreamSources: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.array(require_sleep.StreamSourceEntrySchema)),
16428
16458
  /** Get config entries (key + value + description) for a device. */
@@ -18187,6 +18217,61 @@ var EventKindSchema = zod.z.enum([
18187
18217
  "object",
18188
18218
  "audio"
18189
18219
  ]);
18220
+ /**
18221
+ * Spatial filter for `listTracks` — the rect + polygon variants of the shared
18222
+ * MaskShape vocabulary (see `mask-shape.ts`). Coordinates are NORMALIZED 0..1
18223
+ * of the camera frame (top-left origin), matching the drawing-plane editor.
18224
+ */
18225
+ var TrackZoneFilterSchema = zod.z.discriminatedUnion("kind", [MaskRectShapeSchema, MaskPolygonShapeSchema]);
18226
+ /** Closed icon vocabulary so clients render a known glyph per kind. */
18227
+ var EventKindIconSchema = zod.z.enum([
18228
+ "motion",
18229
+ "audio",
18230
+ "person",
18231
+ "vehicle",
18232
+ "animal",
18233
+ "door",
18234
+ "pir",
18235
+ "smoke",
18236
+ "water",
18237
+ "button",
18238
+ "generic"
18239
+ ]);
18240
+ var EventKindCategorySchema = zod.z.enum([
18241
+ "motion",
18242
+ "audio",
18243
+ "detection",
18244
+ "sensor",
18245
+ "custom"
18246
+ ]);
18247
+ var EventKindDescriptorSchema = zod.z.object({
18248
+ /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
18249
+ kind: zod.z.string(),
18250
+ label: zod.z.string(),
18251
+ /** Hex color for timeline/legend rendering. */
18252
+ color: zod.z.string(),
18253
+ icon: EventKindIconSchema,
18254
+ category: EventKindCategorySchema,
18255
+ /** Which cap + device contributes this kind. For built-ins the camera
18256
+ * itself; for sensor kinds the LINKED source device. */
18257
+ source: zod.z.object({
18258
+ capName: zod.z.string(),
18259
+ deviceId: zod.z.number()
18260
+ })
18261
+ });
18262
+ var SensorEventSchema = zod.z.object({
18263
+ id: zod.z.string(),
18264
+ /** The CAMERA the event is attributed to (a sensor linked to N cameras
18265
+ * yields N rows, one per camera). */
18266
+ deviceId: zod.z.number(),
18267
+ /** The linked sensor device whose state changed. */
18268
+ sourceDeviceId: zod.z.number(),
18269
+ /** Event kind id — matches an `EventKindDescriptor.kind`. */
18270
+ kind: zod.z.string(),
18271
+ /** Snapshot of the sensor cap's runtime-state slice at the change. */
18272
+ value: zod.z.record(zod.z.string(), zod.z.unknown()).nullable(),
18273
+ timestamp: zod.z.number()
18274
+ });
18190
18275
  var TrackPositionSchema = zod.z.object({
18191
18276
  x: zod.z.number(),
18192
18277
  y: zod.z.number(),
@@ -18200,6 +18285,30 @@ var TrackSnapshotSchema = zod.z.object({
18200
18285
  mediaKey: zod.z.string()
18201
18286
  });
18202
18287
  /**
18288
+ * Normalized 0..1 trajectory envelope (min/max over every position bbox,
18289
+ * divided by the track's detection-frame dims), computed at persist time.
18290
+ * Absent when the frame dims were unknown when the track was persisted
18291
+ * (legacy rows / dims-less sources) and on active (in-RAM) tracks.
18292
+ */
18293
+ var TrackEnvelopeSchema = zod.z.object({
18294
+ minX: zod.z.number(),
18295
+ minY: zod.z.number(),
18296
+ maxX: zod.z.number(),
18297
+ maxY: zod.z.number()
18298
+ });
18299
+ /**
18300
+ * Row projection for track list queries. `full` (default) returns the
18301
+ * complete Track including the frame-rate `positions[]` history and the
18302
+ * `snapshots[]` references — megabytes across a page of tracks. `slim`
18303
+ * keeps every scalar the list surfaces actually render (ids, class(es),
18304
+ * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
18305
+ * zonesVisited, bestEventId, envelope) and returns `positions` /
18306
+ * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
18307
+ * `getTrack`. Mirrors the event-store `projection` convention
18308
+ * (`getObjectEvents` et al.).
18309
+ */
18310
+ var TrackProjectionSchema = zod.z.enum(["full", "slim"]);
18311
+ /**
18203
18312
  * One audio-classification label heard on the track's camera while the
18204
18313
  * track was alive, aggregated per label. An "episode" is one persisted
18205
18314
  * audio event (the confident-classification path: score ≥ the device's
@@ -18250,7 +18359,11 @@ var TrackSchema = zod.z.object({
18250
18359
  /** Audio-classification labels heard on the camera during the track's
18251
18360
  * life (score ≥ device `classificationMinScore`), aggregated per label.
18252
18361
  * Absent on legacy rows / tracks with no confident audio. */
18253
- audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional()
18362
+ audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional(),
18363
+ /** Normalized 0..1 trajectory envelope (see {@link TrackEnvelopeSchema}).
18364
+ * Populated from the persisted envelope columns on historical reads;
18365
+ * absent on legacy rows, dims-less tracks and active (in-RAM) tracks. */
18366
+ envelope: TrackEnvelopeSchema.optional()
18254
18367
  });
18255
18368
  var BaseEventFields = {
18256
18369
  id: zod.z.string(),
@@ -18360,11 +18473,13 @@ var MediaFileSchema = zod.z.object({
18360
18473
  sizeBytes: zod.z.number(),
18361
18474
  timestamp: zod.z.number()
18362
18475
  });
18476
+ var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
18477
+ var MAX_EVENT_QUERY_LIMIT = 5e3;
18363
18478
  var DeviceEventQueryInput = zod.z.object({
18364
18479
  deviceId: zod.z.number(),
18365
18480
  since: zod.z.number().optional(),
18366
18481
  until: zod.z.number().optional(),
18367
- limit: zod.z.number().int().min(1).max(5e3).default(1e3),
18482
+ limit: zod.z.number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT),
18368
18483
  /** `slim` drops heavy JSON fields (regions/bbox/zones) and carries an
18369
18484
  * optional `mediaUrl` (populated by B5). `full` (default) keeps today's
18370
18485
  * exact behaviour. Callers may omit this field — the store defaults to
@@ -18372,6 +18487,27 @@ var DeviceEventQueryInput = zod.z.object({
18372
18487
  projection: zod.z.enum(["full", "slim"]).optional()
18373
18488
  });
18374
18489
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: zod.z.string().optional() });
18490
+ var RecentTracksQueryInput = zod.z.object({
18491
+ /** Devices to merge. An empty array yields `{ tracks: [], nextCursor: null }`. */
18492
+ deviceIds: zod.z.array(zod.z.number()),
18493
+ /** Window lower bound on `lastSeen` (inclusive). */
18494
+ since: zod.z.number().optional(),
18495
+ /** Window upper bound on `lastSeen` (inclusive). */
18496
+ until: zod.z.number().optional(),
18497
+ /** Page size. Default 200, max 1000. */
18498
+ limit: zod.z.number().int().min(1).max(1e3).default(200),
18499
+ /** Opaque continuation cursor from a previous page's `nextCursor`.
18500
+ * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
18501
+ cursor: zod.z.string().optional(),
18502
+ /** See {@link TrackProjectionSchema}. Default `full`. */
18503
+ projection: TrackProjectionSchema.optional()
18504
+ });
18505
+ var RecentTracksPageSchema = zod.z.object({
18506
+ /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
18507
+ tracks: zod.z.array(TrackSchema).readonly(),
18508
+ /** Cursor for the next page, or null when this page is the last. */
18509
+ nextCursor: zod.z.string().nullable()
18510
+ });
18375
18511
  var KeyEventQueryInput = zod.z.object({
18376
18512
  deviceId: zod.z.number(),
18377
18513
  /** Window lower bound (track firstSeen ≥ since). */
@@ -18468,8 +18604,27 @@ var pipelineAnalyticsCapability = {
18468
18604
  deviceId: zod.z.number(),
18469
18605
  since: zod.z.number().optional(),
18470
18606
  until: zod.z.number().optional(),
18471
- limit: zod.z.number().optional()
18607
+ limit: zod.z.number().optional(),
18608
+ /** Spatial filter — only tracks whose trajectory intersects the zone
18609
+ * (normalized 0..1 rect or polygon). SQL-prefiltered on the persisted
18610
+ * envelope columns, then precisely tested per position. Tracks with
18611
+ * an unknown envelope (no frame dims at persist time) always match. */
18612
+ zone: TrackZoneFilterSchema.optional(),
18613
+ /** See {@link TrackProjectionSchema}. Default `full` (backward
18614
+ * compatible — omitting the field keeps today's exact behaviour). */
18615
+ projection: TrackProjectionSchema.optional()
18472
18616
  }), zod.z.array(TrackSchema).readonly()),
18617
+ /**
18618
+ * Batched cluster-wide track listing — ONE call for the events page /
18619
+ * reel first paint instead of a per-camera `listTracks` fan-out. Merges
18620
+ * the persisted completed tracks of every requested device, sorted by
18621
+ * `lastSeen` DESC with a stable (lastSeen, trackId) cursor. Per-device
18622
+ * indexed pages (`idx_tracks_device_lastSeen`) are k-way merged
18623
+ * provider-side; `projection: 'slim'` drops the heavy `positions[]` /
18624
+ * `snapshots[]` JSON (returned as empty arrays). Active in-RAM tracks
18625
+ * are not included (same contract as `listTracks`).
18626
+ */
18627
+ listRecentTracks: require_sleep.method(RecentTracksQueryInput, RecentTracksPageSchema),
18473
18628
  clearTracks: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
18474
18629
  kind: "mutation",
18475
18630
  auth: "admin"
@@ -18478,6 +18633,26 @@ var pipelineAnalyticsCapability = {
18478
18633
  getObjectEvents: require_sleep.method(ObjectEventQueryInput, zod.z.array(ObjectEventSchema).readonly()),
18479
18634
  getAudioEvents: require_sleep.method(DeviceEventQueryInput, zod.z.array(AudioEventSchema).readonly()),
18480
18635
  /**
18636
+ * Every event kind the device can produce: built-ins (motion + audio),
18637
+ * detection classes actually observed for the device (from the track
18638
+ * history), and sensor kinds contributed by LINKED devices (resolved via
18639
+ * `device-manager.getLinkedDevices`, mapped through `EVENT_KIND_BY_CAP`).
18640
+ */
18641
+ listEventKinds: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.array(EventKindDescriptorSchema).readonly()),
18642
+ /**
18643
+ * Sensor-event history for a camera: state changes of LINKED sensor
18644
+ * devices, attributed to the camera at ingest time (one row per linked
18645
+ * camera). Mirrors `getAudioEvents` query semantics; `kinds` narrows to
18646
+ * a kind subset.
18647
+ */
18648
+ getSensorEvents: require_sleep.method(zod.z.object({
18649
+ deviceId: zod.z.number(),
18650
+ since: zod.z.number().optional(),
18651
+ until: zod.z.number().optional(),
18652
+ kinds: zod.z.array(zod.z.string()).optional(),
18653
+ limit: zod.z.number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
18654
+ }), zod.z.array(SensorEventSchema).readonly()),
18655
+ /**
18481
18656
  * Importance-ranked highlights for a device+window. Queries completed
18482
18657
  * tracks by (deviceId, firstSeen ∈ [since,until]), scores each (or reuses
18483
18658
  * the persisted score), filters by minImportance/classFilter, orders by
@@ -18623,6 +18798,56 @@ var pipelineAnalyticsCapability = {
18623
18798
  }
18624
18799
  };
18625
18800
  //#endregion
18801
+ //#region src/capabilities/sensor-event-kinds.ts
18802
+ /**
18803
+ * Sensor cap name → static event-kind descriptor. A linked device
18804
+ * contributes one entry per bound cap present in this map.
18805
+ */
18806
+ var EVENT_KIND_BY_CAP = {
18807
+ contact: {
18808
+ kind: "contact",
18809
+ label: "Contact",
18810
+ color: "#f59e0b",
18811
+ icon: "door",
18812
+ category: "sensor"
18813
+ },
18814
+ flood: {
18815
+ kind: "flood",
18816
+ label: "Water leak",
18817
+ color: "#3b82f6",
18818
+ icon: "water",
18819
+ category: "sensor"
18820
+ },
18821
+ gas: {
18822
+ kind: "gas",
18823
+ label: "Gas",
18824
+ color: "#ef4444",
18825
+ icon: "smoke",
18826
+ category: "sensor"
18827
+ },
18828
+ "carbon-monoxide": {
18829
+ kind: "carbon-monoxide",
18830
+ label: "Carbon monoxide",
18831
+ color: "#dc2626",
18832
+ icon: "smoke",
18833
+ category: "sensor"
18834
+ },
18835
+ "enum-sensor": {
18836
+ kind: "enum-sensor",
18837
+ label: "Sensor state",
18838
+ color: "#8b5cf6",
18839
+ icon: "generic",
18840
+ category: "sensor"
18841
+ },
18842
+ "event-emitter": {
18843
+ kind: "device-event",
18844
+ label: "Device event",
18845
+ color: "#10b981",
18846
+ icon: "button",
18847
+ category: "sensor"
18848
+ }
18849
+ };
18850
+ //#endregion
18626
18851
  //#region src/capabilities/pipeline-orchestrator.cap.ts
18627
18852
  var CameraPipelineConfigSchema = zod.z.object({
18628
18853
  engine: PipelineEngineChoiceSchema.optional(),
@@ -20525,7 +20750,15 @@ var webrtcSessionCapability = {
20525
20750
  */
20526
20751
  disableIpv6: zod.z.boolean().optional(),
20527
20752
  /** Subscriber attribution. See `createSession` for the contract. */
20528
- consumerAttribution: BrokerConsumerAttributionSchema.optional()
20753
+ consumerAttribution: BrokerConsumerAttributionSchema.optional(),
20754
+ /**
20755
+ * Client-side stream hints (viewport, downlink) — same contract as
20756
+ * `createSession.hints`. Client-offer viewers (the RN viewer's
20757
+ * `WebrtcLiveSession`) negotiate via `handleOffer`, so without this
20758
+ * field their hints were silently stripped by the schema and the
20759
+ * adaptive ladder started blind on the client's display size.
20760
+ */
20761
+ hints: webrtcClientHintsSchema.optional()
20529
20762
  }), zod.z.object({
20530
20763
  sessionId: zod.z.string(),
20531
20764
  sdpAnswer: zod.z.string()
@@ -23148,7 +23381,12 @@ var RecordingStorageUsageSchema = zod.z.object({
23148
23381
  /**
23149
23382
  * Result of locating footage at a wall-clock instant for one device/profile.
23150
23383
  * `segment` carries the covering segment's window; `gap` reports the forward
23151
- * nearest covered edge (`null` past the end of footage / when none exists).
23384
+ * nearest covered edge (`null` past the end of footage / when none exists)
23385
+ * and the backward covered edge `prevEndMs` (exclusive end of the nearest
23386
+ * footage behind the epoch; `null` when none — optional so older providers
23387
+ * that omit it stay valid). `prevEndMs` lets a backward frame-step hop the
23388
+ * small inter-segment cracks (durMs under-covers the span to the next
23389
+ * startMs by ~11-17 ms) instead of no-opping at a segment head.
23152
23390
  */
23153
23391
  var LocateSegmentResultSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
23154
23392
  kind: zod.z.literal("segment"),
@@ -23157,7 +23395,8 @@ var LocateSegmentResultSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
23157
23395
  bytes: zod.z.number()
23158
23396
  }), zod.z.object({
23159
23397
  kind: zod.z.literal("gap"),
23160
- nearestEdgeMs: zod.z.number().nullable()
23398
+ nearestEdgeMs: zod.z.number().nullable(),
23399
+ prevEndMs: zod.z.number().nullable().optional()
23161
23400
  })]);
23162
23401
  /** Raw bytes of one finalized footage segment (read off disk on the recording node). */
23163
23402
  var ReadSegmentBytesResultSchema = zod.z.object({ data: zod.z.instanceof(Uint8Array) });
@@ -26073,6 +26312,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
26073
26312
  addonId: null,
26074
26313
  access: "view"
26075
26314
  },
26315
+ "deviceManager.getLinkedDevices": {
26316
+ capName: "device-manager",
26317
+ capScope: "system",
26318
+ addonId: null,
26319
+ access: "view"
26320
+ },
26076
26321
  "deviceManager.getRoleDisplayDefaults": {
26077
26322
  capName: "device-manager",
26078
26323
  capScope: "system",
@@ -27627,6 +27872,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
27627
27872
  addonId: null,
27628
27873
  access: "view"
27629
27874
  },
27875
+ "pipelineAnalytics.getSensorEvents": {
27876
+ capName: "pipeline-analytics",
27877
+ capScope: "device",
27878
+ addonId: null,
27879
+ access: "view"
27880
+ },
27630
27881
  "pipelineAnalytics.getTrack": {
27631
27882
  capName: "pipeline-analytics",
27632
27883
  capScope: "device",
@@ -27639,6 +27890,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
27639
27890
  addonId: null,
27640
27891
  access: "view"
27641
27892
  },
27893
+ "pipelineAnalytics.listEventKinds": {
27894
+ capName: "pipeline-analytics",
27895
+ capScope: "device",
27896
+ addonId: null,
27897
+ access: "view"
27898
+ },
27899
+ "pipelineAnalytics.listRecentTracks": {
27900
+ capName: "pipeline-analytics",
27901
+ capScope: "device",
27902
+ addonId: null,
27903
+ access: "view"
27904
+ },
27642
27905
  "pipelineAnalytics.listTracks": {
27643
27906
  capName: "pipeline-analytics",
27644
27907
  capScope: "device",
@@ -30585,6 +30848,7 @@ exports.DeviceExportStatusSchema = DeviceExportStatusSchema;
30585
30848
  exports.DeviceExportUnexposeInputSchema = UnexposeInputSchema;
30586
30849
  exports.DeviceFeature = require_sleep.DeviceFeature;
30587
30850
  exports.DeviceInfoSchema = DeviceInfoSchema;
30851
+ exports.DeviceLinkModeSchema = DeviceLinkModeSchema;
30588
30852
  exports.DeviceNetworkStatsSchema = DeviceNetworkStatsSchema;
30589
30853
  exports.DeviceRole = require_sleep.DeviceRole;
30590
30854
  exports.DeviceRuntimeState = DeviceRuntimeState;
@@ -30597,6 +30861,7 @@ exports.DiscoveredTargetSchema = DiscoveredTargetSchema;
30597
30861
  exports.DisposerChain = require_sleep.DisposerChain;
30598
30862
  exports.DoorbellPressEventSchema = DoorbellPressEventSchema;
30599
30863
  exports.DoorbellStatusSchema = DoorbellStatusSchema;
30864
+ exports.EVENT_KIND_BY_CAP = EVENT_KIND_BY_CAP;
30600
30865
  exports.EVENT_PAD_MS = EVENT_PAD_MS;
30601
30866
  exports.EXPRESSION_BUILTINS = EXPRESSION_BUILTINS;
30602
30867
  exports.EXPRESSION_BUILTIN_NAMES = EXPRESSION_BUILTIN_NAMES;
@@ -30611,12 +30876,15 @@ exports.EncodedPacketSchema = require_sleep.EncodedPacketSchema;
30611
30876
  exports.EnrichedWidgetMetadataSchema = EnrichedWidgetMetadataSchema;
30612
30877
  exports.EnumSensorDateTimeFormatSchema = EnumSensorDateTimeFormatSchema;
30613
30878
  exports.EnumSensorStatusSchema = EnumSensorStatusSchema;
30614
- exports.EventCategory = require_sleep.EventCategory;
30879
+ exports.EventCategory = require_event_category.EventCategory;
30615
30880
  exports.EventEmitterStatusSchema = EventEmitterStatusSchema;
30616
30881
  exports.EventFireSchema = EventFireSchema;
30617
30882
  exports.EventItemSchema = EventItemSchema;
30883
+ exports.EventKindCategorySchema = EventKindCategorySchema;
30884
+ exports.EventKindDescriptorSchema = EventKindDescriptorSchema;
30885
+ exports.EventKindIconSchema = EventKindIconSchema;
30618
30886
  exports.EventKindSchema = EventKindSchema;
30619
- exports.EventSourceType = EventSourceType;
30887
+ exports.EventSourceType = require_enums.EventSourceType$1;
30620
30888
  exports.ExportSetupFieldSchema = ExportSetupFieldSchema;
30621
30889
  exports.ExportSetupSchema = ExportSetupSchema;
30622
30890
  exports.ExposedDeviceSchema = ExposedDeviceSchema;
@@ -30659,6 +30927,7 @@ exports.KeyEventSchema = KeyEventSchema;
30659
30927
  exports.LabelDefinitionSchema = LabelDefinitionSchema;
30660
30928
  exports.LawnMowerActivitySchema = LawnMowerActivitySchema;
30661
30929
  exports.LawnMowerControlStatusSchema = LawnMowerControlStatusSchema;
30930
+ exports.LinkedDeviceSchema = LinkedDeviceSchema;
30662
30931
  exports.LlmDefaultSchema = LlmDefaultSchema;
30663
30932
  exports.LlmDefaultSelectorSchema = LlmDefaultSelectorSchema;
30664
30933
  exports.LlmErrorCodeSchema = LlmErrorCodeSchema;
@@ -30816,6 +31085,8 @@ exports.RawStateResultSchema = require_sleep.RawStateResultSchema;
30816
31085
  exports.ReadSegmentBytesResultSchema = ReadSegmentBytesResultSchema;
30817
31086
  exports.ReadinessRegistry = require_sleep.ReadinessRegistry;
30818
31087
  exports.ReadinessTimeoutError = require_sleep.ReadinessTimeoutError;
31088
+ exports.RecentTracksPageSchema = RecentTracksPageSchema;
31089
+ exports.RecentTracksQueryInput = RecentTracksQueryInput;
30819
31090
  exports.RecordingAvailabilitySchema = RecordingAvailabilitySchema;
30820
31091
  exports.RecordingBandModeSchema = RecordingBandModeSchema;
30821
31092
  exports.RecordingBandSchema = RecordingBandSchema;
@@ -30866,6 +31137,7 @@ exports.SearchResultSchema = SearchResultSchema;
30866
31137
  exports.SendEmailInputSchema = SendEmailInputSchema;
30867
31138
  exports.SendEmailResultSchema = SendEmailResultSchema;
30868
31139
  exports.SendResultSchema = SendResultSchema;
31140
+ exports.SensorEventSchema = SensorEventSchema;
30869
31141
  exports.ServerBootModeSchema = ServerBootModeSchema;
30870
31142
  exports.ServerPackageStatusSchema = ServerPackageStatusSchema;
30871
31143
  exports.ServerRollbackInfoSchema = ServerRollbackInfoSchema;
@@ -30934,8 +31206,11 @@ exports.TopologyNodeSchema = TopologyNodeSchema;
30934
31206
  exports.TopologyProcessSchema = TopologyProcessSchema;
30935
31207
  exports.TopologyServiceSchema = TopologyServiceSchema;
30936
31208
  exports.TrackCascadeCountsSchema = TrackCascadeCountsSchema;
31209
+ exports.TrackEnvelopeSchema = TrackEnvelopeSchema;
31210
+ exports.TrackProjectionSchema = TrackProjectionSchema;
30937
31211
  exports.TrackSchema = TrackSchema;
30938
31212
  exports.TrackStateSchema = TrackStateSchema;
31213
+ exports.TrackZoneFilterSchema = TrackZoneFilterSchema;
30939
31214
  exports.TrackedDetectionSchema = TrackedDetectionSchema;
30940
31215
  exports.TurnServerSchema = TurnServerSchema;
30941
31216
  exports.UNIT_TABLE = UNIT_TABLE;