@camstack/addon-cloudflare 1.1.21 → 1.1.22

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.
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4630
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6731,6 +6731,18 @@ function method(input, output, options) {
6731
6731
  timeoutMs: options?.timeoutMs
6732
6732
  };
6733
6733
  }
6734
+ /**
6735
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6736
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6737
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6738
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6739
+ */
6740
+ function systemMethod(input, output, options) {
6741
+ return {
6742
+ ...method(input, output, options),
6743
+ systemOnly: true
6744
+ };
6745
+ }
6734
6746
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6735
6747
  var VersionOutputSchema$1 = object({ version: string() });
6736
6748
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10469,6 +10481,7 @@ var PipelineAddonSchemaSchema = object({
10469
10481
  defaultModelId: string(),
10470
10482
  defaultModelIdByFormat: record(string(), string()).optional(),
10471
10483
  enabledByDefault: boolean().optional(),
10484
+ backfillIntoExistingOverrides: boolean().optional(),
10472
10485
  defaultConfidence: number(),
10473
10486
  group: string().optional(),
10474
10487
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10775,6 +10788,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10775
10788
  auth: "admin"
10776
10789
  }), object({ zones: array(ZoneSchema).readonly() });
10777
10790
  /**
10791
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10792
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10793
+ * so the caller supplies only the detection-res bbox divided by the detection
10794
+ * dims — no native resolution to plumb.
10795
+ */
10796
+ var NativeCropBboxSchema = object({
10797
+ x: number(),
10798
+ y: number(),
10799
+ w: number(),
10800
+ h: number()
10801
+ });
10802
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10803
+ var NativeCropResultSchema = object({
10804
+ /** Packed rgb (24-bit) pixels of the crop. */
10805
+ bytes: _instanceof(Uint8Array),
10806
+ width: number().int().positive(),
10807
+ height: number().int().positive()
10808
+ });
10809
+ /**
10778
10810
  * Per-camera tunable ranges + defaults. Single source of truth used
10779
10811
  * by both the Zod data schema (validation + default fallback) and
10780
10812
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11030,7 +11062,11 @@ var RunnerLocalMetricsSchema = object({
11030
11062
  avgInferenceTimeMs: number(),
11031
11063
  queueDepth: number()
11032
11064
  });
11033
- 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());
11065
+ 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({
11066
+ handle: FrameHandleSchema,
11067
+ bbox: NativeCropBboxSchema,
11068
+ maxWidth: number().int().positive().optional()
11069
+ }), NativeCropResultSchema.nullable());
11034
11070
  object({
11035
11071
  detected: boolean(),
11036
11072
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15106,7 +15142,17 @@ var TrackSchema = object({
15106
15142
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15107
15143
  totalDistance: number(),
15108
15144
  state: TrackStateSchema,
15109
- active: boolean()
15145
+ active: boolean(),
15146
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15147
+ * track expiry, recomputed on late label). Absent on legacy rows written
15148
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15149
+ importance: number().optional(),
15150
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15151
+ * "best" frame). Absent when the track produced no object events. */
15152
+ bestEventId: string().optional(),
15153
+ /** Tag of the importance sub-signal that dominated the score
15154
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15155
+ importanceReason: string().optional()
15110
15156
  });
15111
15157
  var BaseEventFields = {
15112
15158
  id: string(),
@@ -15171,8 +15217,18 @@ var ObjectEventSchema = object({
15171
15217
  frameHeight: number().optional(),
15172
15218
  /** MediaStore key for the crop attached to this event (if any). */
15173
15219
  mediaKey: string().optional(),
15220
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15221
+ * best-detection full frame). Resolve via the event-media data-plane
15222
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15223
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15224
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15225
+ keyFrameMediaKey: string().optional(),
15174
15226
  /** Populated by B5 (recording playback URL for this event). */
15175
- mediaUrl: string().optional()
15227
+ mediaUrl: string().optional(),
15228
+ /** The parent track's key-event importance [0,1], propagated to every object
15229
+ * event of the track (so an event row can be sorted by importance without a
15230
+ * track join). Absent on legacy rows / before the track was scored. */
15231
+ importance: number().optional()
15176
15232
  });
15177
15233
  var AudioEventSchema = object({
15178
15234
  ...BaseEventFields,
@@ -15196,7 +15252,8 @@ var MediaFileKindEnum = _enum([
15196
15252
  "fullFrame",
15197
15253
  "fullFrameBoxed",
15198
15254
  "faceCrop",
15199
- "plateCrop"
15255
+ "plateCrop",
15256
+ "keyFrame"
15200
15257
  ]);
15201
15258
  var MediaFileSchema = object({
15202
15259
  key: string(),
@@ -15217,6 +15274,32 @@ var DeviceEventQueryInput = object({
15217
15274
  projection: _enum(["full", "slim"]).optional()
15218
15275
  });
15219
15276
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15277
+ var KeyEventQueryInput = object({
15278
+ deviceId: number(),
15279
+ /** Window lower bound (track firstSeen ≥ since). */
15280
+ since: number(),
15281
+ /** Window upper bound (track firstSeen ≤ until). */
15282
+ until: number(),
15283
+ limit: number().int().min(1).max(200).default(50),
15284
+ /** Drop tracks scoring below this importance. */
15285
+ minImportance: number().min(0).max(1).optional(),
15286
+ /** Restrict to a single class (e.g. 'person'). */
15287
+ classFilter: string().optional()
15288
+ });
15289
+ var KeyEventSchema = object({
15290
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15291
+ id: string(),
15292
+ trackId: string(),
15293
+ /** Track start time (firstSeen). */
15294
+ timestamp: number(),
15295
+ className: string(),
15296
+ label: string().optional(),
15297
+ importance: number(),
15298
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15299
+ bestEventId: string(),
15300
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15301
+ windowMs: number().optional()
15302
+ });
15220
15303
  var TrackedDetectionSchema = object({
15221
15304
  trackId: string(),
15222
15305
  className: string(),
@@ -15246,7 +15329,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15246
15329
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15247
15330
  kind: "mutation",
15248
15331
  auth: "admin"
15249
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15332
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15250
15333
  deviceId: number(),
15251
15334
  since: number(),
15252
15335
  until: number(),
@@ -16013,7 +16096,12 @@ DeviceType.Camera, method(object({
16013
16096
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16014
16097
  kind: "mutation",
16015
16098
  auth: "admin"
16016
- });
16099
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16100
+ deviceId: number(),
16101
+ lastCapturedAt: number().nullable(),
16102
+ cacheAgeMs: number().nullable(),
16103
+ etag: string().nullable()
16104
+ })));
16017
16105
  /**
16018
16106
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16019
16107
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16287,10 +16375,32 @@ getTurnServers: method(_void(), array(TurnServerSchema).readonly()) }
16287
16375
  * b. `finishAuthentication({userId, response})` → server verifies
16288
16376
  * the assertion, bumps the credential counter, returns ok.
16289
16377
  *
16378
+ * 2b. Usernameless (discoverable-credential) authentication — the
16379
+ * passkey IS the primary factor, no password leg:
16380
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16381
+ * EMPTY `allowCredentials` (the browser offers every resident
16382
+ * passkey it holds for this RP) + `userVerification: 'required'`
16383
+ * (the passkey replaces both factors, so UV is mandatory).
16384
+ * The challenge is stored server-side, NOT bound to any user.
16385
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16386
+ * resolves the credential by the response's credential id,
16387
+ * verifies the assertion against the stored challenge + that
16388
+ * credential's public key/counter, and returns the OWNING
16389
+ * `userId` — the caller (core auth router) mints the session.
16390
+ *
16290
16391
  * 3. Management:
16291
16392
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16292
16393
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16293
16394
  *
16395
+ * 4. Second-factor preference (opt-in, default OFF):
16396
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16397
+ * demanded as a second factor after a password login ONLY when the
16398
+ * user explicitly opts in via `setSecondFactorPreference`.
16399
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16400
+ * row ⇒ `enabled: false`).
16401
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16402
+ * the providing addon beside its credentials.
16403
+ *
16294
16404
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16295
16405
  * the admin-ui composes the begin/finish round-trip and never exposes
16296
16406
  * the cap to non-admins.
@@ -16333,6 +16443,17 @@ method(object({
16333
16443
  }), object({ verified: boolean() }), {
16334
16444
  kind: "mutation",
16335
16445
  access: "view"
16446
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16447
+ kind: "mutation",
16448
+ access: "view"
16449
+ }), method(object({
16450
+ /** AuthenticationResponseJSON from the browser. */
16451
+ response: record(string(), unknown()) }), object({
16452
+ verified: boolean(),
16453
+ userId: string().nullable()
16454
+ }), {
16455
+ kind: "mutation",
16456
+ access: "view"
16336
16457
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16337
16458
  userId: string(),
16338
16459
  credentialId: string()
@@ -16340,6 +16461,13 @@ method(object({
16340
16461
  kind: "mutation",
16341
16462
  auth: "admin",
16342
16463
  access: "delete"
16464
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16465
+ userId: string(),
16466
+ enabled: boolean()
16467
+ }), object({ success: literal(true) }), {
16468
+ kind: "mutation",
16469
+ auth: "admin",
16470
+ access: "create"
16343
16471
  });
16344
16472
  /**
16345
16473
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17141,7 +17269,17 @@ var FaceInfoSchema = object({
17141
17269
  recognizedIdentityId: string().optional(),
17142
17270
  identityName: string().optional(),
17143
17271
  assigned: boolean(),
17144
- base64: string().optional()
17272
+ base64: string().optional(),
17273
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17274
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17275
+ * legacy rows written before design B. */
17276
+ faceBbox: BoundingBoxSchema.optional(),
17277
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17278
+ * Fetch the native JPEG via the event-media data-plane
17279
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17280
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17281
+ * back to the inline `base64` face crop. */
17282
+ keyFrameMediaKey: string().optional()
17145
17283
  });
17146
17284
  var FaceFilterEnum = _enum([
17147
17285
  "unassigned",
@@ -21260,6 +21398,12 @@ Object.freeze({
21260
21398
  addonId: null,
21261
21399
  access: "view"
21262
21400
  },
21401
+ "pipelineAnalytics.getKeyEvents": {
21402
+ capName: "pipeline-analytics",
21403
+ capScope: "device",
21404
+ addonId: null,
21405
+ access: "view"
21406
+ },
21263
21407
  "pipelineAnalytics.getMotionEvents": {
21264
21408
  capName: "pipeline-analytics",
21265
21409
  capScope: "device",
@@ -21788,6 +21932,12 @@ Object.freeze({
21788
21932
  addonId: null,
21789
21933
  access: "view"
21790
21934
  },
21935
+ "pipelineRunner.getNativeCrop": {
21936
+ capName: "pipeline-runner",
21937
+ capScope: "system",
21938
+ addonId: null,
21939
+ access: "view"
21940
+ },
21791
21941
  "pipelineRunner.reportMotion": {
21792
21942
  capName: "pipeline-runner",
21793
21943
  capScope: "system",
@@ -22154,6 +22304,12 @@ Object.freeze({
22154
22304
  addonId: null,
22155
22305
  access: "view"
22156
22306
  },
22307
+ "snapshot.getSnapshotOverview": {
22308
+ capName: "snapshot",
22309
+ capScope: "device",
22310
+ addonId: null,
22311
+ access: "view"
22312
+ },
22157
22313
  "snapshot.invalidateCache": {
22158
22314
  capName: "snapshot",
22159
22315
  capScope: "device",
@@ -22832,6 +22988,12 @@ Object.freeze({
22832
22988
  addonId: null,
22833
22989
  access: "view"
22834
22990
  },
22991
+ "userPasskeys.beginDiscoverableAuthentication": {
22992
+ capName: "user-passkeys",
22993
+ capScope: "system",
22994
+ addonId: null,
22995
+ access: "view"
22996
+ },
22835
22997
  "userPasskeys.beginRegistration": {
22836
22998
  capName: "user-passkeys",
22837
22999
  capScope: "system",
@@ -22844,12 +23006,24 @@ Object.freeze({
22844
23006
  addonId: null,
22845
23007
  access: "view"
22846
23008
  },
23009
+ "userPasskeys.finishDiscoverableAuthentication": {
23010
+ capName: "user-passkeys",
23011
+ capScope: "system",
23012
+ addonId: null,
23013
+ access: "view"
23014
+ },
22847
23015
  "userPasskeys.finishRegistration": {
22848
23016
  capName: "user-passkeys",
22849
23017
  capScope: "system",
22850
23018
  addonId: null,
22851
23019
  access: "create"
22852
23020
  },
23021
+ "userPasskeys.getSecondFactorPreference": {
23022
+ capName: "user-passkeys",
23023
+ capScope: "system",
23024
+ addonId: null,
23025
+ access: "view"
23026
+ },
22853
23027
  "userPasskeys.listPasskeys": {
22854
23028
  capName: "user-passkeys",
22855
23029
  capScope: "system",
@@ -22862,6 +23036,12 @@ Object.freeze({
22862
23036
  addonId: null,
22863
23037
  access: "delete"
22864
23038
  },
23039
+ "userPasskeys.setSecondFactorPreference": {
23040
+ capName: "user-passkeys",
23041
+ capScope: "system",
23042
+ addonId: null,
23043
+ access: "create"
23044
+ },
22865
23045
  "vacuumControl.locate": {
22866
23046
  capName: "vacuum-control",
22867
23047
  capScope: "device",
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4630
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6731,6 +6731,18 @@ function method(input, output, options) {
6731
6731
  timeoutMs: options?.timeoutMs
6732
6732
  };
6733
6733
  }
6734
+ /**
6735
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6736
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6737
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6738
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6739
+ */
6740
+ function systemMethod(input, output, options) {
6741
+ return {
6742
+ ...method(input, output, options),
6743
+ systemOnly: true
6744
+ };
6745
+ }
6734
6746
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6735
6747
  var VersionOutputSchema$1 = object({ version: string() });
6736
6748
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10469,6 +10481,7 @@ var PipelineAddonSchemaSchema = object({
10469
10481
  defaultModelId: string(),
10470
10482
  defaultModelIdByFormat: record(string(), string()).optional(),
10471
10483
  enabledByDefault: boolean().optional(),
10484
+ backfillIntoExistingOverrides: boolean().optional(),
10472
10485
  defaultConfidence: number(),
10473
10486
  group: string().optional(),
10474
10487
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10775,6 +10788,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10775
10788
  auth: "admin"
10776
10789
  }), object({ zones: array(ZoneSchema).readonly() });
10777
10790
  /**
10791
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10792
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10793
+ * so the caller supplies only the detection-res bbox divided by the detection
10794
+ * dims — no native resolution to plumb.
10795
+ */
10796
+ var NativeCropBboxSchema = object({
10797
+ x: number(),
10798
+ y: number(),
10799
+ w: number(),
10800
+ h: number()
10801
+ });
10802
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10803
+ var NativeCropResultSchema = object({
10804
+ /** Packed rgb (24-bit) pixels of the crop. */
10805
+ bytes: _instanceof(Uint8Array),
10806
+ width: number().int().positive(),
10807
+ height: number().int().positive()
10808
+ });
10809
+ /**
10778
10810
  * Per-camera tunable ranges + defaults. Single source of truth used
10779
10811
  * by both the Zod data schema (validation + default fallback) and
10780
10812
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11030,7 +11062,11 @@ var RunnerLocalMetricsSchema = object({
11030
11062
  avgInferenceTimeMs: number(),
11031
11063
  queueDepth: number()
11032
11064
  });
11033
- 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());
11065
+ 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({
11066
+ handle: FrameHandleSchema,
11067
+ bbox: NativeCropBboxSchema,
11068
+ maxWidth: number().int().positive().optional()
11069
+ }), NativeCropResultSchema.nullable());
11034
11070
  object({
11035
11071
  detected: boolean(),
11036
11072
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15106,7 +15142,17 @@ var TrackSchema = object({
15106
15142
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15107
15143
  totalDistance: number(),
15108
15144
  state: TrackStateSchema,
15109
- active: boolean()
15145
+ active: boolean(),
15146
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15147
+ * track expiry, recomputed on late label). Absent on legacy rows written
15148
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15149
+ importance: number().optional(),
15150
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15151
+ * "best" frame). Absent when the track produced no object events. */
15152
+ bestEventId: string().optional(),
15153
+ /** Tag of the importance sub-signal that dominated the score
15154
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15155
+ importanceReason: string().optional()
15110
15156
  });
15111
15157
  var BaseEventFields = {
15112
15158
  id: string(),
@@ -15171,8 +15217,18 @@ var ObjectEventSchema = object({
15171
15217
  frameHeight: number().optional(),
15172
15218
  /** MediaStore key for the crop attached to this event (if any). */
15173
15219
  mediaKey: string().optional(),
15220
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15221
+ * best-detection full frame). Resolve via the event-media data-plane
15222
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15223
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15224
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15225
+ keyFrameMediaKey: string().optional(),
15174
15226
  /** Populated by B5 (recording playback URL for this event). */
15175
- mediaUrl: string().optional()
15227
+ mediaUrl: string().optional(),
15228
+ /** The parent track's key-event importance [0,1], propagated to every object
15229
+ * event of the track (so an event row can be sorted by importance without a
15230
+ * track join). Absent on legacy rows / before the track was scored. */
15231
+ importance: number().optional()
15176
15232
  });
15177
15233
  var AudioEventSchema = object({
15178
15234
  ...BaseEventFields,
@@ -15196,7 +15252,8 @@ var MediaFileKindEnum = _enum([
15196
15252
  "fullFrame",
15197
15253
  "fullFrameBoxed",
15198
15254
  "faceCrop",
15199
- "plateCrop"
15255
+ "plateCrop",
15256
+ "keyFrame"
15200
15257
  ]);
15201
15258
  var MediaFileSchema = object({
15202
15259
  key: string(),
@@ -15217,6 +15274,32 @@ var DeviceEventQueryInput = object({
15217
15274
  projection: _enum(["full", "slim"]).optional()
15218
15275
  });
15219
15276
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15277
+ var KeyEventQueryInput = object({
15278
+ deviceId: number(),
15279
+ /** Window lower bound (track firstSeen ≥ since). */
15280
+ since: number(),
15281
+ /** Window upper bound (track firstSeen ≤ until). */
15282
+ until: number(),
15283
+ limit: number().int().min(1).max(200).default(50),
15284
+ /** Drop tracks scoring below this importance. */
15285
+ minImportance: number().min(0).max(1).optional(),
15286
+ /** Restrict to a single class (e.g. 'person'). */
15287
+ classFilter: string().optional()
15288
+ });
15289
+ var KeyEventSchema = object({
15290
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15291
+ id: string(),
15292
+ trackId: string(),
15293
+ /** Track start time (firstSeen). */
15294
+ timestamp: number(),
15295
+ className: string(),
15296
+ label: string().optional(),
15297
+ importance: number(),
15298
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15299
+ bestEventId: string(),
15300
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15301
+ windowMs: number().optional()
15302
+ });
15220
15303
  var TrackedDetectionSchema = object({
15221
15304
  trackId: string(),
15222
15305
  className: string(),
@@ -15246,7 +15329,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15246
15329
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15247
15330
  kind: "mutation",
15248
15331
  auth: "admin"
15249
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15332
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15250
15333
  deviceId: number(),
15251
15334
  since: number(),
15252
15335
  until: number(),
@@ -16013,7 +16096,12 @@ DeviceType.Camera, method(object({
16013
16096
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16014
16097
  kind: "mutation",
16015
16098
  auth: "admin"
16016
- });
16099
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16100
+ deviceId: number(),
16101
+ lastCapturedAt: number().nullable(),
16102
+ cacheAgeMs: number().nullable(),
16103
+ etag: string().nullable()
16104
+ })));
16017
16105
  /**
16018
16106
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16019
16107
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16287,10 +16375,32 @@ getTurnServers: method(_void(), array(TurnServerSchema).readonly()) }
16287
16375
  * b. `finishAuthentication({userId, response})` → server verifies
16288
16376
  * the assertion, bumps the credential counter, returns ok.
16289
16377
  *
16378
+ * 2b. Usernameless (discoverable-credential) authentication — the
16379
+ * passkey IS the primary factor, no password leg:
16380
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16381
+ * EMPTY `allowCredentials` (the browser offers every resident
16382
+ * passkey it holds for this RP) + `userVerification: 'required'`
16383
+ * (the passkey replaces both factors, so UV is mandatory).
16384
+ * The challenge is stored server-side, NOT bound to any user.
16385
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16386
+ * resolves the credential by the response's credential id,
16387
+ * verifies the assertion against the stored challenge + that
16388
+ * credential's public key/counter, and returns the OWNING
16389
+ * `userId` — the caller (core auth router) mints the session.
16390
+ *
16290
16391
  * 3. Management:
16291
16392
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16292
16393
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16293
16394
  *
16395
+ * 4. Second-factor preference (opt-in, default OFF):
16396
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16397
+ * demanded as a second factor after a password login ONLY when the
16398
+ * user explicitly opts in via `setSecondFactorPreference`.
16399
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16400
+ * row ⇒ `enabled: false`).
16401
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16402
+ * the providing addon beside its credentials.
16403
+ *
16294
16404
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16295
16405
  * the admin-ui composes the begin/finish round-trip and never exposes
16296
16406
  * the cap to non-admins.
@@ -16333,6 +16443,17 @@ method(object({
16333
16443
  }), object({ verified: boolean() }), {
16334
16444
  kind: "mutation",
16335
16445
  access: "view"
16446
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16447
+ kind: "mutation",
16448
+ access: "view"
16449
+ }), method(object({
16450
+ /** AuthenticationResponseJSON from the browser. */
16451
+ response: record(string(), unknown()) }), object({
16452
+ verified: boolean(),
16453
+ userId: string().nullable()
16454
+ }), {
16455
+ kind: "mutation",
16456
+ access: "view"
16336
16457
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16337
16458
  userId: string(),
16338
16459
  credentialId: string()
@@ -16340,6 +16461,13 @@ method(object({
16340
16461
  kind: "mutation",
16341
16462
  auth: "admin",
16342
16463
  access: "delete"
16464
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16465
+ userId: string(),
16466
+ enabled: boolean()
16467
+ }), object({ success: literal(true) }), {
16468
+ kind: "mutation",
16469
+ auth: "admin",
16470
+ access: "create"
16343
16471
  });
16344
16472
  /**
16345
16473
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17141,7 +17269,17 @@ var FaceInfoSchema = object({
17141
17269
  recognizedIdentityId: string().optional(),
17142
17270
  identityName: string().optional(),
17143
17271
  assigned: boolean(),
17144
- base64: string().optional()
17272
+ base64: string().optional(),
17273
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17274
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17275
+ * legacy rows written before design B. */
17276
+ faceBbox: BoundingBoxSchema.optional(),
17277
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17278
+ * Fetch the native JPEG via the event-media data-plane
17279
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17280
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17281
+ * back to the inline `base64` face crop. */
17282
+ keyFrameMediaKey: string().optional()
17145
17283
  });
17146
17284
  var FaceFilterEnum = _enum([
17147
17285
  "unassigned",
@@ -21260,6 +21398,12 @@ Object.freeze({
21260
21398
  addonId: null,
21261
21399
  access: "view"
21262
21400
  },
21401
+ "pipelineAnalytics.getKeyEvents": {
21402
+ capName: "pipeline-analytics",
21403
+ capScope: "device",
21404
+ addonId: null,
21405
+ access: "view"
21406
+ },
21263
21407
  "pipelineAnalytics.getMotionEvents": {
21264
21408
  capName: "pipeline-analytics",
21265
21409
  capScope: "device",
@@ -21788,6 +21932,12 @@ Object.freeze({
21788
21932
  addonId: null,
21789
21933
  access: "view"
21790
21934
  },
21935
+ "pipelineRunner.getNativeCrop": {
21936
+ capName: "pipeline-runner",
21937
+ capScope: "system",
21938
+ addonId: null,
21939
+ access: "view"
21940
+ },
21791
21941
  "pipelineRunner.reportMotion": {
21792
21942
  capName: "pipeline-runner",
21793
21943
  capScope: "system",
@@ -22154,6 +22304,12 @@ Object.freeze({
22154
22304
  addonId: null,
22155
22305
  access: "view"
22156
22306
  },
22307
+ "snapshot.getSnapshotOverview": {
22308
+ capName: "snapshot",
22309
+ capScope: "device",
22310
+ addonId: null,
22311
+ access: "view"
22312
+ },
22157
22313
  "snapshot.invalidateCache": {
22158
22314
  capName: "snapshot",
22159
22315
  capScope: "device",
@@ -22832,6 +22988,12 @@ Object.freeze({
22832
22988
  addonId: null,
22833
22989
  access: "view"
22834
22990
  },
22991
+ "userPasskeys.beginDiscoverableAuthentication": {
22992
+ capName: "user-passkeys",
22993
+ capScope: "system",
22994
+ addonId: null,
22995
+ access: "view"
22996
+ },
22835
22997
  "userPasskeys.beginRegistration": {
22836
22998
  capName: "user-passkeys",
22837
22999
  capScope: "system",
@@ -22844,12 +23006,24 @@ Object.freeze({
22844
23006
  addonId: null,
22845
23007
  access: "view"
22846
23008
  },
23009
+ "userPasskeys.finishDiscoverableAuthentication": {
23010
+ capName: "user-passkeys",
23011
+ capScope: "system",
23012
+ addonId: null,
23013
+ access: "view"
23014
+ },
22847
23015
  "userPasskeys.finishRegistration": {
22848
23016
  capName: "user-passkeys",
22849
23017
  capScope: "system",
22850
23018
  addonId: null,
22851
23019
  access: "create"
22852
23020
  },
23021
+ "userPasskeys.getSecondFactorPreference": {
23022
+ capName: "user-passkeys",
23023
+ capScope: "system",
23024
+ addonId: null,
23025
+ access: "view"
23026
+ },
22853
23027
  "userPasskeys.listPasskeys": {
22854
23028
  capName: "user-passkeys",
22855
23029
  capScope: "system",
@@ -22862,6 +23036,12 @@ Object.freeze({
22862
23036
  addonId: null,
22863
23037
  access: "delete"
22864
23038
  },
23039
+ "userPasskeys.setSecondFactorPreference": {
23040
+ capName: "user-passkeys",
23041
+ capScope: "system",
23042
+ addonId: null,
23043
+ access: "create"
23044
+ },
22865
23045
  "vacuumControl.locate": {
22866
23046
  capName: "vacuum-control",
22867
23047
  capScope: "device",
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_dist = require("../dist-CKwL81JS.js");
24
+ const require_dist = require("../dist-B-5cEVeX.js");
25
25
  let node_path = require("node:path");
26
26
  node_path = __toESM(node_path);
27
27
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-B_c-nZHY.mjs";
1
+ import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-BYAmzLm5.mjs";
2
2
  import * as path from "node:path";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-CKwL81JS.js");
2
+ const require_dist = require("../dist-B-5cEVeX.js");
3
3
  //#region src/turn/cloudflare-turn.ts
4
4
  /**
5
5
  * Cloudflare returns ICE servers in several flavours depending on which
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-B_c-nZHY.mjs";
1
+ import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-BYAmzLm5.mjs";
2
2
  //#region src/turn/cloudflare-turn.ts
3
3
  /**
4
4
  * Cloudflare returns ICE servers in several flavours depending on which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-cloudflare",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Cloudflare bundle — Tunnel (network-access) + TURN relay (turn-provider). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",