@camstack/addon-mqtt-broker 1.1.20 → 1.1.21

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.
@@ -4673,7 +4673,7 @@ function _instanceof(cls, params = {}) {
4673
4673
  return inst;
4674
4674
  }
4675
4675
  //#endregion
4676
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4676
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4677
4677
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4678
4678
  EventCategory["SystemBoot"] = "system.boot";
4679
4679
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6777,6 +6777,18 @@ function method(input, output, options) {
6777
6777
  timeoutMs: options?.timeoutMs
6778
6778
  };
6779
6779
  }
6780
+ /**
6781
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6782
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6783
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6784
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6785
+ */
6786
+ function systemMethod(input, output, options) {
6787
+ return {
6788
+ ...method(input, output, options),
6789
+ systemOnly: true
6790
+ };
6791
+ }
6780
6792
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6781
6793
  var VersionOutputSchema$1 = object({ version: string() });
6782
6794
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10515,6 +10527,7 @@ var PipelineAddonSchemaSchema = object({
10515
10527
  defaultModelId: string(),
10516
10528
  defaultModelIdByFormat: record(string(), string()).optional(),
10517
10529
  enabledByDefault: boolean().optional(),
10530
+ backfillIntoExistingOverrides: boolean().optional(),
10518
10531
  defaultConfidence: number(),
10519
10532
  group: string().optional(),
10520
10533
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10821,6 +10834,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10821
10834
  auth: "admin"
10822
10835
  }), object({ zones: array(ZoneSchema).readonly() });
10823
10836
  /**
10837
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10838
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10839
+ * so the caller supplies only the detection-res bbox divided by the detection
10840
+ * dims — no native resolution to plumb.
10841
+ */
10842
+ var NativeCropBboxSchema = object({
10843
+ x: number(),
10844
+ y: number(),
10845
+ w: number(),
10846
+ h: number()
10847
+ });
10848
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10849
+ var NativeCropResultSchema = object({
10850
+ /** Packed rgb (24-bit) pixels of the crop. */
10851
+ bytes: _instanceof(Uint8Array),
10852
+ width: number().int().positive(),
10853
+ height: number().int().positive()
10854
+ });
10855
+ /**
10824
10856
  * Per-camera tunable ranges + defaults. Single source of truth used
10825
10857
  * by both the Zod data schema (validation + default fallback) and
10826
10858
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11076,7 +11108,11 @@ var RunnerLocalMetricsSchema = object({
11076
11108
  avgInferenceTimeMs: number(),
11077
11109
  queueDepth: number()
11078
11110
  });
11079
- method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly());
11111
+ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11112
+ handle: FrameHandleSchema,
11113
+ bbox: NativeCropBboxSchema,
11114
+ maxWidth: number().int().positive().optional()
11115
+ }), NativeCropResultSchema.nullable());
11080
11116
  object({
11081
11117
  detected: boolean(),
11082
11118
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15182,7 +15218,17 @@ var TrackSchema = object({
15182
15218
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15183
15219
  totalDistance: number(),
15184
15220
  state: TrackStateSchema,
15185
- active: boolean()
15221
+ active: boolean(),
15222
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15223
+ * track expiry, recomputed on late label). Absent on legacy rows written
15224
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15225
+ importance: number().optional(),
15226
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15227
+ * "best" frame). Absent when the track produced no object events. */
15228
+ bestEventId: string().optional(),
15229
+ /** Tag of the importance sub-signal that dominated the score
15230
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15231
+ importanceReason: string().optional()
15186
15232
  });
15187
15233
  var BaseEventFields = {
15188
15234
  id: string(),
@@ -15247,8 +15293,18 @@ var ObjectEventSchema = object({
15247
15293
  frameHeight: number().optional(),
15248
15294
  /** MediaStore key for the crop attached to this event (if any). */
15249
15295
  mediaKey: string().optional(),
15296
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15297
+ * best-detection full frame). Resolve via the event-media data-plane
15298
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15299
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15300
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15301
+ keyFrameMediaKey: string().optional(),
15250
15302
  /** Populated by B5 (recording playback URL for this event). */
15251
- mediaUrl: string().optional()
15303
+ mediaUrl: string().optional(),
15304
+ /** The parent track's key-event importance [0,1], propagated to every object
15305
+ * event of the track (so an event row can be sorted by importance without a
15306
+ * track join). Absent on legacy rows / before the track was scored. */
15307
+ importance: number().optional()
15252
15308
  });
15253
15309
  var AudioEventSchema = object({
15254
15310
  ...BaseEventFields,
@@ -15272,7 +15328,8 @@ var MediaFileKindEnum = _enum([
15272
15328
  "fullFrame",
15273
15329
  "fullFrameBoxed",
15274
15330
  "faceCrop",
15275
- "plateCrop"
15331
+ "plateCrop",
15332
+ "keyFrame"
15276
15333
  ]);
15277
15334
  var MediaFileSchema = object({
15278
15335
  key: string(),
@@ -15293,6 +15350,32 @@ var DeviceEventQueryInput = object({
15293
15350
  projection: _enum(["full", "slim"]).optional()
15294
15351
  });
15295
15352
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15353
+ var KeyEventQueryInput = object({
15354
+ deviceId: number(),
15355
+ /** Window lower bound (track firstSeen ≥ since). */
15356
+ since: number(),
15357
+ /** Window upper bound (track firstSeen ≤ until). */
15358
+ until: number(),
15359
+ limit: number().int().min(1).max(200).default(50),
15360
+ /** Drop tracks scoring below this importance. */
15361
+ minImportance: number().min(0).max(1).optional(),
15362
+ /** Restrict to a single class (e.g. 'person'). */
15363
+ classFilter: string().optional()
15364
+ });
15365
+ var KeyEventSchema = object({
15366
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15367
+ id: string(),
15368
+ trackId: string(),
15369
+ /** Track start time (firstSeen). */
15370
+ timestamp: number(),
15371
+ className: string(),
15372
+ label: string().optional(),
15373
+ importance: number(),
15374
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15375
+ bestEventId: string(),
15376
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15377
+ windowMs: number().optional()
15378
+ });
15296
15379
  var TrackedDetectionSchema = object({
15297
15380
  trackId: string(),
15298
15381
  className: string(),
@@ -15322,7 +15405,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15322
15405
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15323
15406
  kind: "mutation",
15324
15407
  auth: "admin"
15325
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15408
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15326
15409
  deviceId: number(),
15327
15410
  since: number(),
15328
15411
  until: number(),
@@ -16089,7 +16172,12 @@ DeviceType.Camera, method(object({
16089
16172
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16090
16173
  kind: "mutation",
16091
16174
  auth: "admin"
16092
- });
16175
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16176
+ deviceId: number(),
16177
+ lastCapturedAt: number().nullable(),
16178
+ cacheAgeMs: number().nullable(),
16179
+ etag: string().nullable()
16180
+ })));
16093
16181
  /**
16094
16182
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16095
16183
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16340,10 +16428,32 @@ method(_void(), array(TurnServerSchema).readonly());
16340
16428
  * b. `finishAuthentication({userId, response})` → server verifies
16341
16429
  * the assertion, bumps the credential counter, returns ok.
16342
16430
  *
16431
+ * 2b. Usernameless (discoverable-credential) authentication — the
16432
+ * passkey IS the primary factor, no password leg:
16433
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16434
+ * EMPTY `allowCredentials` (the browser offers every resident
16435
+ * passkey it holds for this RP) + `userVerification: 'required'`
16436
+ * (the passkey replaces both factors, so UV is mandatory).
16437
+ * The challenge is stored server-side, NOT bound to any user.
16438
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16439
+ * resolves the credential by the response's credential id,
16440
+ * verifies the assertion against the stored challenge + that
16441
+ * credential's public key/counter, and returns the OWNING
16442
+ * `userId` — the caller (core auth router) mints the session.
16443
+ *
16343
16444
  * 3. Management:
16344
16445
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16345
16446
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16346
16447
  *
16448
+ * 4. Second-factor preference (opt-in, default OFF):
16449
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16450
+ * demanded as a second factor after a password login ONLY when the
16451
+ * user explicitly opts in via `setSecondFactorPreference`.
16452
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16453
+ * row ⇒ `enabled: false`).
16454
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16455
+ * the providing addon beside its credentials.
16456
+ *
16347
16457
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16348
16458
  * the admin-ui composes the begin/finish round-trip and never exposes
16349
16459
  * the cap to non-admins.
@@ -16386,6 +16496,17 @@ method(object({
16386
16496
  }), object({ verified: boolean() }), {
16387
16497
  kind: "mutation",
16388
16498
  access: "view"
16499
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16500
+ kind: "mutation",
16501
+ access: "view"
16502
+ }), method(object({
16503
+ /** AuthenticationResponseJSON from the browser. */
16504
+ response: record(string(), unknown()) }), object({
16505
+ verified: boolean(),
16506
+ userId: string().nullable()
16507
+ }), {
16508
+ kind: "mutation",
16509
+ access: "view"
16389
16510
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16390
16511
  userId: string(),
16391
16512
  credentialId: string()
@@ -16393,6 +16514,13 @@ method(object({
16393
16514
  kind: "mutation",
16394
16515
  auth: "admin",
16395
16516
  access: "delete"
16517
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16518
+ userId: string(),
16519
+ enabled: boolean()
16520
+ }), object({ success: literal(true) }), {
16521
+ kind: "mutation",
16522
+ auth: "admin",
16523
+ access: "create"
16396
16524
  });
16397
16525
  /**
16398
16526
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17194,7 +17322,17 @@ var FaceInfoSchema = object({
17194
17322
  recognizedIdentityId: string().optional(),
17195
17323
  identityName: string().optional(),
17196
17324
  assigned: boolean(),
17197
- base64: string().optional()
17325
+ base64: string().optional(),
17326
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17327
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17328
+ * legacy rows written before design B. */
17329
+ faceBbox: BoundingBoxSchema.optional(),
17330
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17331
+ * Fetch the native JPEG via the event-media data-plane
17332
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17333
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17334
+ * back to the inline `base64` face crop. */
17335
+ keyFrameMediaKey: string().optional()
17198
17336
  });
17199
17337
  var FaceFilterEnum = _enum([
17200
17338
  "unassigned",
@@ -21313,6 +21451,12 @@ Object.freeze({
21313
21451
  addonId: null,
21314
21452
  access: "view"
21315
21453
  },
21454
+ "pipelineAnalytics.getKeyEvents": {
21455
+ capName: "pipeline-analytics",
21456
+ capScope: "device",
21457
+ addonId: null,
21458
+ access: "view"
21459
+ },
21316
21460
  "pipelineAnalytics.getMotionEvents": {
21317
21461
  capName: "pipeline-analytics",
21318
21462
  capScope: "device",
@@ -21841,6 +21985,12 @@ Object.freeze({
21841
21985
  addonId: null,
21842
21986
  access: "view"
21843
21987
  },
21988
+ "pipelineRunner.getNativeCrop": {
21989
+ capName: "pipeline-runner",
21990
+ capScope: "system",
21991
+ addonId: null,
21992
+ access: "view"
21993
+ },
21844
21994
  "pipelineRunner.reportMotion": {
21845
21995
  capName: "pipeline-runner",
21846
21996
  capScope: "system",
@@ -22207,6 +22357,12 @@ Object.freeze({
22207
22357
  addonId: null,
22208
22358
  access: "view"
22209
22359
  },
22360
+ "snapshot.getSnapshotOverview": {
22361
+ capName: "snapshot",
22362
+ capScope: "device",
22363
+ addonId: null,
22364
+ access: "view"
22365
+ },
22210
22366
  "snapshot.invalidateCache": {
22211
22367
  capName: "snapshot",
22212
22368
  capScope: "device",
@@ -22885,6 +23041,12 @@ Object.freeze({
22885
23041
  addonId: null,
22886
23042
  access: "view"
22887
23043
  },
23044
+ "userPasskeys.beginDiscoverableAuthentication": {
23045
+ capName: "user-passkeys",
23046
+ capScope: "system",
23047
+ addonId: null,
23048
+ access: "view"
23049
+ },
22888
23050
  "userPasskeys.beginRegistration": {
22889
23051
  capName: "user-passkeys",
22890
23052
  capScope: "system",
@@ -22897,12 +23059,24 @@ Object.freeze({
22897
23059
  addonId: null,
22898
23060
  access: "view"
22899
23061
  },
23062
+ "userPasskeys.finishDiscoverableAuthentication": {
23063
+ capName: "user-passkeys",
23064
+ capScope: "system",
23065
+ addonId: null,
23066
+ access: "view"
23067
+ },
22900
23068
  "userPasskeys.finishRegistration": {
22901
23069
  capName: "user-passkeys",
22902
23070
  capScope: "system",
22903
23071
  addonId: null,
22904
23072
  access: "create"
22905
23073
  },
23074
+ "userPasskeys.getSecondFactorPreference": {
23075
+ capName: "user-passkeys",
23076
+ capScope: "system",
23077
+ addonId: null,
23078
+ access: "view"
23079
+ },
22906
23080
  "userPasskeys.listPasskeys": {
22907
23081
  capName: "user-passkeys",
22908
23082
  capScope: "system",
@@ -22915,6 +23089,12 @@ Object.freeze({
22915
23089
  addonId: null,
22916
23090
  access: "delete"
22917
23091
  },
23092
+ "userPasskeys.setSecondFactorPreference": {
23093
+ capName: "user-passkeys",
23094
+ capScope: "system",
23095
+ addonId: null,
23096
+ access: "create"
23097
+ },
22918
23098
  "vacuumControl.locate": {
22919
23099
  capName: "vacuum-control",
22920
23100
  capScope: "device",
@@ -4668,7 +4668,7 @@ function _instanceof(cls, params = {}) {
4668
4668
  return inst;
4669
4669
  }
4670
4670
  //#endregion
4671
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4671
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4672
4672
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4673
4673
  EventCategory["SystemBoot"] = "system.boot";
4674
4674
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6772,6 +6772,18 @@ function method(input, output, options) {
6772
6772
  timeoutMs: options?.timeoutMs
6773
6773
  };
6774
6774
  }
6775
+ /**
6776
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6777
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6778
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6779
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6780
+ */
6781
+ function systemMethod(input, output, options) {
6782
+ return {
6783
+ ...method(input, output, options),
6784
+ systemOnly: true
6785
+ };
6786
+ }
6775
6787
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6776
6788
  var VersionOutputSchema$1 = object({ version: string() });
6777
6789
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10510,6 +10522,7 @@ var PipelineAddonSchemaSchema = object({
10510
10522
  defaultModelId: string(),
10511
10523
  defaultModelIdByFormat: record(string(), string()).optional(),
10512
10524
  enabledByDefault: boolean().optional(),
10525
+ backfillIntoExistingOverrides: boolean().optional(),
10513
10526
  defaultConfidence: number(),
10514
10527
  group: string().optional(),
10515
10528
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10816,6 +10829,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10816
10829
  auth: "admin"
10817
10830
  }), object({ zones: array(ZoneSchema).readonly() });
10818
10831
  /**
10832
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10833
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10834
+ * so the caller supplies only the detection-res bbox divided by the detection
10835
+ * dims — no native resolution to plumb.
10836
+ */
10837
+ var NativeCropBboxSchema = object({
10838
+ x: number(),
10839
+ y: number(),
10840
+ w: number(),
10841
+ h: number()
10842
+ });
10843
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10844
+ var NativeCropResultSchema = object({
10845
+ /** Packed rgb (24-bit) pixels of the crop. */
10846
+ bytes: _instanceof(Uint8Array),
10847
+ width: number().int().positive(),
10848
+ height: number().int().positive()
10849
+ });
10850
+ /**
10819
10851
  * Per-camera tunable ranges + defaults. Single source of truth used
10820
10852
  * by both the Zod data schema (validation + default fallback) and
10821
10853
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11071,7 +11103,11 @@ var RunnerLocalMetricsSchema = object({
11071
11103
  avgInferenceTimeMs: number(),
11072
11104
  queueDepth: number()
11073
11105
  });
11074
- method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly());
11106
+ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11107
+ handle: FrameHandleSchema,
11108
+ bbox: NativeCropBboxSchema,
11109
+ maxWidth: number().int().positive().optional()
11110
+ }), NativeCropResultSchema.nullable());
11075
11111
  object({
11076
11112
  detected: boolean(),
11077
11113
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15177,7 +15213,17 @@ var TrackSchema = object({
15177
15213
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15178
15214
  totalDistance: number(),
15179
15215
  state: TrackStateSchema,
15180
- active: boolean()
15216
+ active: boolean(),
15217
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15218
+ * track expiry, recomputed on late label). Absent on legacy rows written
15219
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15220
+ importance: number().optional(),
15221
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15222
+ * "best" frame). Absent when the track produced no object events. */
15223
+ bestEventId: string().optional(),
15224
+ /** Tag of the importance sub-signal that dominated the score
15225
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15226
+ importanceReason: string().optional()
15181
15227
  });
15182
15228
  var BaseEventFields = {
15183
15229
  id: string(),
@@ -15242,8 +15288,18 @@ var ObjectEventSchema = object({
15242
15288
  frameHeight: number().optional(),
15243
15289
  /** MediaStore key for the crop attached to this event (if any). */
15244
15290
  mediaKey: string().optional(),
15291
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15292
+ * best-detection full frame). Resolve via the event-media data-plane
15293
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15294
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15295
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15296
+ keyFrameMediaKey: string().optional(),
15245
15297
  /** Populated by B5 (recording playback URL for this event). */
15246
- mediaUrl: string().optional()
15298
+ mediaUrl: string().optional(),
15299
+ /** The parent track's key-event importance [0,1], propagated to every object
15300
+ * event of the track (so an event row can be sorted by importance without a
15301
+ * track join). Absent on legacy rows / before the track was scored. */
15302
+ importance: number().optional()
15247
15303
  });
15248
15304
  var AudioEventSchema = object({
15249
15305
  ...BaseEventFields,
@@ -15267,7 +15323,8 @@ var MediaFileKindEnum = _enum([
15267
15323
  "fullFrame",
15268
15324
  "fullFrameBoxed",
15269
15325
  "faceCrop",
15270
- "plateCrop"
15326
+ "plateCrop",
15327
+ "keyFrame"
15271
15328
  ]);
15272
15329
  var MediaFileSchema = object({
15273
15330
  key: string(),
@@ -15288,6 +15345,32 @@ var DeviceEventQueryInput = object({
15288
15345
  projection: _enum(["full", "slim"]).optional()
15289
15346
  });
15290
15347
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15348
+ var KeyEventQueryInput = object({
15349
+ deviceId: number(),
15350
+ /** Window lower bound (track firstSeen ≥ since). */
15351
+ since: number(),
15352
+ /** Window upper bound (track firstSeen ≤ until). */
15353
+ until: number(),
15354
+ limit: number().int().min(1).max(200).default(50),
15355
+ /** Drop tracks scoring below this importance. */
15356
+ minImportance: number().min(0).max(1).optional(),
15357
+ /** Restrict to a single class (e.g. 'person'). */
15358
+ classFilter: string().optional()
15359
+ });
15360
+ var KeyEventSchema = object({
15361
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15362
+ id: string(),
15363
+ trackId: string(),
15364
+ /** Track start time (firstSeen). */
15365
+ timestamp: number(),
15366
+ className: string(),
15367
+ label: string().optional(),
15368
+ importance: number(),
15369
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15370
+ bestEventId: string(),
15371
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15372
+ windowMs: number().optional()
15373
+ });
15291
15374
  var TrackedDetectionSchema = object({
15292
15375
  trackId: string(),
15293
15376
  className: string(),
@@ -15317,7 +15400,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15317
15400
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15318
15401
  kind: "mutation",
15319
15402
  auth: "admin"
15320
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15403
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15321
15404
  deviceId: number(),
15322
15405
  since: number(),
15323
15406
  until: number(),
@@ -16084,7 +16167,12 @@ DeviceType.Camera, method(object({
16084
16167
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16085
16168
  kind: "mutation",
16086
16169
  auth: "admin"
16087
- });
16170
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16171
+ deviceId: number(),
16172
+ lastCapturedAt: number().nullable(),
16173
+ cacheAgeMs: number().nullable(),
16174
+ etag: string().nullable()
16175
+ })));
16088
16176
  /**
16089
16177
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16090
16178
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16335,10 +16423,32 @@ method(_void(), array(TurnServerSchema).readonly());
16335
16423
  * b. `finishAuthentication({userId, response})` → server verifies
16336
16424
  * the assertion, bumps the credential counter, returns ok.
16337
16425
  *
16426
+ * 2b. Usernameless (discoverable-credential) authentication — the
16427
+ * passkey IS the primary factor, no password leg:
16428
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16429
+ * EMPTY `allowCredentials` (the browser offers every resident
16430
+ * passkey it holds for this RP) + `userVerification: 'required'`
16431
+ * (the passkey replaces both factors, so UV is mandatory).
16432
+ * The challenge is stored server-side, NOT bound to any user.
16433
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16434
+ * resolves the credential by the response's credential id,
16435
+ * verifies the assertion against the stored challenge + that
16436
+ * credential's public key/counter, and returns the OWNING
16437
+ * `userId` — the caller (core auth router) mints the session.
16438
+ *
16338
16439
  * 3. Management:
16339
16440
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16340
16441
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16341
16442
  *
16443
+ * 4. Second-factor preference (opt-in, default OFF):
16444
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16445
+ * demanded as a second factor after a password login ONLY when the
16446
+ * user explicitly opts in via `setSecondFactorPreference`.
16447
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16448
+ * row ⇒ `enabled: false`).
16449
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16450
+ * the providing addon beside its credentials.
16451
+ *
16342
16452
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16343
16453
  * the admin-ui composes the begin/finish round-trip and never exposes
16344
16454
  * the cap to non-admins.
@@ -16381,6 +16491,17 @@ method(object({
16381
16491
  }), object({ verified: boolean() }), {
16382
16492
  kind: "mutation",
16383
16493
  access: "view"
16494
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16495
+ kind: "mutation",
16496
+ access: "view"
16497
+ }), method(object({
16498
+ /** AuthenticationResponseJSON from the browser. */
16499
+ response: record(string(), unknown()) }), object({
16500
+ verified: boolean(),
16501
+ userId: string().nullable()
16502
+ }), {
16503
+ kind: "mutation",
16504
+ access: "view"
16384
16505
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16385
16506
  userId: string(),
16386
16507
  credentialId: string()
@@ -16388,6 +16509,13 @@ method(object({
16388
16509
  kind: "mutation",
16389
16510
  auth: "admin",
16390
16511
  access: "delete"
16512
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16513
+ userId: string(),
16514
+ enabled: boolean()
16515
+ }), object({ success: literal(true) }), {
16516
+ kind: "mutation",
16517
+ auth: "admin",
16518
+ access: "create"
16391
16519
  });
16392
16520
  /**
16393
16521
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17189,7 +17317,17 @@ var FaceInfoSchema = object({
17189
17317
  recognizedIdentityId: string().optional(),
17190
17318
  identityName: string().optional(),
17191
17319
  assigned: boolean(),
17192
- base64: string().optional()
17320
+ base64: string().optional(),
17321
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17322
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17323
+ * legacy rows written before design B. */
17324
+ faceBbox: BoundingBoxSchema.optional(),
17325
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17326
+ * Fetch the native JPEG via the event-media data-plane
17327
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17328
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17329
+ * back to the inline `base64` face crop. */
17330
+ keyFrameMediaKey: string().optional()
17193
17331
  });
17194
17332
  var FaceFilterEnum = _enum([
17195
17333
  "unassigned",
@@ -21308,6 +21446,12 @@ Object.freeze({
21308
21446
  addonId: null,
21309
21447
  access: "view"
21310
21448
  },
21449
+ "pipelineAnalytics.getKeyEvents": {
21450
+ capName: "pipeline-analytics",
21451
+ capScope: "device",
21452
+ addonId: null,
21453
+ access: "view"
21454
+ },
21311
21455
  "pipelineAnalytics.getMotionEvents": {
21312
21456
  capName: "pipeline-analytics",
21313
21457
  capScope: "device",
@@ -21836,6 +21980,12 @@ Object.freeze({
21836
21980
  addonId: null,
21837
21981
  access: "view"
21838
21982
  },
21983
+ "pipelineRunner.getNativeCrop": {
21984
+ capName: "pipeline-runner",
21985
+ capScope: "system",
21986
+ addonId: null,
21987
+ access: "view"
21988
+ },
21839
21989
  "pipelineRunner.reportMotion": {
21840
21990
  capName: "pipeline-runner",
21841
21991
  capScope: "system",
@@ -22202,6 +22352,12 @@ Object.freeze({
22202
22352
  addonId: null,
22203
22353
  access: "view"
22204
22354
  },
22355
+ "snapshot.getSnapshotOverview": {
22356
+ capName: "snapshot",
22357
+ capScope: "device",
22358
+ addonId: null,
22359
+ access: "view"
22360
+ },
22205
22361
  "snapshot.invalidateCache": {
22206
22362
  capName: "snapshot",
22207
22363
  capScope: "device",
@@ -22880,6 +23036,12 @@ Object.freeze({
22880
23036
  addonId: null,
22881
23037
  access: "view"
22882
23038
  },
23039
+ "userPasskeys.beginDiscoverableAuthentication": {
23040
+ capName: "user-passkeys",
23041
+ capScope: "system",
23042
+ addonId: null,
23043
+ access: "view"
23044
+ },
22883
23045
  "userPasskeys.beginRegistration": {
22884
23046
  capName: "user-passkeys",
22885
23047
  capScope: "system",
@@ -22892,12 +23054,24 @@ Object.freeze({
22892
23054
  addonId: null,
22893
23055
  access: "view"
22894
23056
  },
23057
+ "userPasskeys.finishDiscoverableAuthentication": {
23058
+ capName: "user-passkeys",
23059
+ capScope: "system",
23060
+ addonId: null,
23061
+ access: "view"
23062
+ },
22895
23063
  "userPasskeys.finishRegistration": {
22896
23064
  capName: "user-passkeys",
22897
23065
  capScope: "system",
22898
23066
  addonId: null,
22899
23067
  access: "create"
22900
23068
  },
23069
+ "userPasskeys.getSecondFactorPreference": {
23070
+ capName: "user-passkeys",
23071
+ capScope: "system",
23072
+ addonId: null,
23073
+ access: "view"
23074
+ },
22901
23075
  "userPasskeys.listPasskeys": {
22902
23076
  capName: "user-passkeys",
22903
23077
  capScope: "system",
@@ -22910,6 +23084,12 @@ Object.freeze({
22910
23084
  addonId: null,
22911
23085
  access: "delete"
22912
23086
  },
23087
+ "userPasskeys.setSecondFactorPreference": {
23088
+ capName: "user-passkeys",
23089
+ capScope: "system",
23090
+ addonId: null,
23091
+ access: "create"
23092
+ },
22913
23093
  "vacuumControl.locate": {
22914
23094
  capName: "vacuum-control",
22915
23095
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",