@camstack/addon-decoder-ffmpeg 1.1.10 → 1.1.11

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.
package/dist/index.js CHANGED
@@ -4635,7 +4635,7 @@ function _instanceof(cls, params = {}) {
4635
4635
  return inst;
4636
4636
  }
4637
4637
  //#endregion
4638
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4638
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4639
4639
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4640
4640
  EventCategory["SystemBoot"] = "system.boot";
4641
4641
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6739,6 +6739,18 @@ function method(input, output, options) {
6739
6739
  timeoutMs: options?.timeoutMs
6740
6740
  };
6741
6741
  }
6742
+ /**
6743
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6744
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6745
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6746
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6747
+ */
6748
+ function systemMethod(input, output, options) {
6749
+ return {
6750
+ ...method(input, output, options),
6751
+ systemOnly: true
6752
+ };
6753
+ }
6742
6754
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6743
6755
  var VersionOutputSchema$1 = object({ version: string() });
6744
6756
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10489,6 +10501,7 @@ var PipelineAddonSchemaSchema = object({
10489
10501
  defaultModelId: string(),
10490
10502
  defaultModelIdByFormat: record(string(), string()).optional(),
10491
10503
  enabledByDefault: boolean().optional(),
10504
+ backfillIntoExistingOverrides: boolean().optional(),
10492
10505
  defaultConfidence: number(),
10493
10506
  group: string().optional(),
10494
10507
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10795,6 +10808,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10795
10808
  auth: "admin"
10796
10809
  }), object({ zones: array(ZoneSchema).readonly() });
10797
10810
  /**
10811
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10812
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10813
+ * so the caller supplies only the detection-res bbox divided by the detection
10814
+ * dims — no native resolution to plumb.
10815
+ */
10816
+ var NativeCropBboxSchema = object({
10817
+ x: number(),
10818
+ y: number(),
10819
+ w: number(),
10820
+ h: number()
10821
+ });
10822
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10823
+ var NativeCropResultSchema = object({
10824
+ /** Packed rgb (24-bit) pixels of the crop. */
10825
+ bytes: _instanceof(Uint8Array),
10826
+ width: number().int().positive(),
10827
+ height: number().int().positive()
10828
+ });
10829
+ /**
10798
10830
  * Per-camera tunable ranges + defaults. Single source of truth used
10799
10831
  * by both the Zod data schema (validation + default fallback) and
10800
10832
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11050,7 +11082,11 @@ var RunnerLocalMetricsSchema = object({
11050
11082
  avgInferenceTimeMs: number(),
11051
11083
  queueDepth: number()
11052
11084
  });
11053
- 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());
11085
+ 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({
11086
+ handle: FrameHandleSchema,
11087
+ bbox: NativeCropBboxSchema,
11088
+ maxWidth: number().int().positive().optional()
11089
+ }), NativeCropResultSchema.nullable());
11054
11090
  object({
11055
11091
  detected: boolean(),
11056
11092
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15218,7 +15254,17 @@ var TrackSchema = object({
15218
15254
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15219
15255
  totalDistance: number(),
15220
15256
  state: TrackStateSchema,
15221
- active: boolean()
15257
+ active: boolean(),
15258
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15259
+ * track expiry, recomputed on late label). Absent on legacy rows written
15260
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15261
+ importance: number().optional(),
15262
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15263
+ * "best" frame). Absent when the track produced no object events. */
15264
+ bestEventId: string().optional(),
15265
+ /** Tag of the importance sub-signal that dominated the score
15266
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15267
+ importanceReason: string().optional()
15222
15268
  });
15223
15269
  var BaseEventFields = {
15224
15270
  id: string(),
@@ -15283,8 +15329,18 @@ var ObjectEventSchema = object({
15283
15329
  frameHeight: number().optional(),
15284
15330
  /** MediaStore key for the crop attached to this event (if any). */
15285
15331
  mediaKey: string().optional(),
15332
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15333
+ * best-detection full frame). Resolve via the event-media data-plane
15334
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15335
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15336
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15337
+ keyFrameMediaKey: string().optional(),
15286
15338
  /** Populated by B5 (recording playback URL for this event). */
15287
- mediaUrl: string().optional()
15339
+ mediaUrl: string().optional(),
15340
+ /** The parent track's key-event importance [0,1], propagated to every object
15341
+ * event of the track (so an event row can be sorted by importance without a
15342
+ * track join). Absent on legacy rows / before the track was scored. */
15343
+ importance: number().optional()
15288
15344
  });
15289
15345
  var AudioEventSchema = object({
15290
15346
  ...BaseEventFields,
@@ -15308,7 +15364,8 @@ var MediaFileKindEnum = _enum([
15308
15364
  "fullFrame",
15309
15365
  "fullFrameBoxed",
15310
15366
  "faceCrop",
15311
- "plateCrop"
15367
+ "plateCrop",
15368
+ "keyFrame"
15312
15369
  ]);
15313
15370
  var MediaFileSchema = object({
15314
15371
  key: string(),
@@ -15329,6 +15386,32 @@ var DeviceEventQueryInput = object({
15329
15386
  projection: _enum(["full", "slim"]).optional()
15330
15387
  });
15331
15388
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15389
+ var KeyEventQueryInput = object({
15390
+ deviceId: number(),
15391
+ /** Window lower bound (track firstSeen ≥ since). */
15392
+ since: number(),
15393
+ /** Window upper bound (track firstSeen ≤ until). */
15394
+ until: number(),
15395
+ limit: number().int().min(1).max(200).default(50),
15396
+ /** Drop tracks scoring below this importance. */
15397
+ minImportance: number().min(0).max(1).optional(),
15398
+ /** Restrict to a single class (e.g. 'person'). */
15399
+ classFilter: string().optional()
15400
+ });
15401
+ var KeyEventSchema = object({
15402
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15403
+ id: string(),
15404
+ trackId: string(),
15405
+ /** Track start time (firstSeen). */
15406
+ timestamp: number(),
15407
+ className: string(),
15408
+ label: string().optional(),
15409
+ importance: number(),
15410
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15411
+ bestEventId: string(),
15412
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15413
+ windowMs: number().optional()
15414
+ });
15332
15415
  var TrackedDetectionSchema = object({
15333
15416
  trackId: string(),
15334
15417
  className: string(),
@@ -15358,7 +15441,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15358
15441
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15359
15442
  kind: "mutation",
15360
15443
  auth: "admin"
15361
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15444
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15362
15445
  deviceId: number(),
15363
15446
  since: number(),
15364
15447
  until: number(),
@@ -16125,7 +16208,12 @@ DeviceType.Camera, method(object({
16125
16208
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16126
16209
  kind: "mutation",
16127
16210
  auth: "admin"
16128
- });
16211
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16212
+ deviceId: number(),
16213
+ lastCapturedAt: number().nullable(),
16214
+ cacheAgeMs: number().nullable(),
16215
+ etag: string().nullable()
16216
+ })));
16129
16217
  /**
16130
16218
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16131
16219
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16376,10 +16464,32 @@ method(_void(), array(TurnServerSchema).readonly());
16376
16464
  * b. `finishAuthentication({userId, response})` → server verifies
16377
16465
  * the assertion, bumps the credential counter, returns ok.
16378
16466
  *
16467
+ * 2b. Usernameless (discoverable-credential) authentication — the
16468
+ * passkey IS the primary factor, no password leg:
16469
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16470
+ * EMPTY `allowCredentials` (the browser offers every resident
16471
+ * passkey it holds for this RP) + `userVerification: 'required'`
16472
+ * (the passkey replaces both factors, so UV is mandatory).
16473
+ * The challenge is stored server-side, NOT bound to any user.
16474
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16475
+ * resolves the credential by the response's credential id,
16476
+ * verifies the assertion against the stored challenge + that
16477
+ * credential's public key/counter, and returns the OWNING
16478
+ * `userId` — the caller (core auth router) mints the session.
16479
+ *
16379
16480
  * 3. Management:
16380
16481
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16381
16482
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16382
16483
  *
16484
+ * 4. Second-factor preference (opt-in, default OFF):
16485
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16486
+ * demanded as a second factor after a password login ONLY when the
16487
+ * user explicitly opts in via `setSecondFactorPreference`.
16488
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16489
+ * row ⇒ `enabled: false`).
16490
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16491
+ * the providing addon beside its credentials.
16492
+ *
16383
16493
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16384
16494
  * the admin-ui composes the begin/finish round-trip and never exposes
16385
16495
  * the cap to non-admins.
@@ -16422,6 +16532,17 @@ method(object({
16422
16532
  }), object({ verified: boolean() }), {
16423
16533
  kind: "mutation",
16424
16534
  access: "view"
16535
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16536
+ kind: "mutation",
16537
+ access: "view"
16538
+ }), method(object({
16539
+ /** AuthenticationResponseJSON from the browser. */
16540
+ response: record(string(), unknown()) }), object({
16541
+ verified: boolean(),
16542
+ userId: string().nullable()
16543
+ }), {
16544
+ kind: "mutation",
16545
+ access: "view"
16425
16546
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16426
16547
  userId: string(),
16427
16548
  credentialId: string()
@@ -16429,6 +16550,13 @@ method(object({
16429
16550
  kind: "mutation",
16430
16551
  auth: "admin",
16431
16552
  access: "delete"
16553
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16554
+ userId: string(),
16555
+ enabled: boolean()
16556
+ }), object({ success: literal(true) }), {
16557
+ kind: "mutation",
16558
+ auth: "admin",
16559
+ access: "create"
16432
16560
  });
16433
16561
  /**
16434
16562
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17230,7 +17358,17 @@ var FaceInfoSchema = object({
17230
17358
  recognizedIdentityId: string().optional(),
17231
17359
  identityName: string().optional(),
17232
17360
  assigned: boolean(),
17233
- base64: string().optional()
17361
+ base64: string().optional(),
17362
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17363
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17364
+ * legacy rows written before design B. */
17365
+ faceBbox: BoundingBoxSchema.optional(),
17366
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17367
+ * Fetch the native JPEG via the event-media data-plane
17368
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17369
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17370
+ * back to the inline `base64` face crop. */
17371
+ keyFrameMediaKey: string().optional()
17234
17372
  });
17235
17373
  var FaceFilterEnum = _enum([
17236
17374
  "unassigned",
@@ -21349,6 +21487,12 @@ Object.freeze({
21349
21487
  addonId: null,
21350
21488
  access: "view"
21351
21489
  },
21490
+ "pipelineAnalytics.getKeyEvents": {
21491
+ capName: "pipeline-analytics",
21492
+ capScope: "device",
21493
+ addonId: null,
21494
+ access: "view"
21495
+ },
21352
21496
  "pipelineAnalytics.getMotionEvents": {
21353
21497
  capName: "pipeline-analytics",
21354
21498
  capScope: "device",
@@ -21877,6 +22021,12 @@ Object.freeze({
21877
22021
  addonId: null,
21878
22022
  access: "view"
21879
22023
  },
22024
+ "pipelineRunner.getNativeCrop": {
22025
+ capName: "pipeline-runner",
22026
+ capScope: "system",
22027
+ addonId: null,
22028
+ access: "view"
22029
+ },
21880
22030
  "pipelineRunner.reportMotion": {
21881
22031
  capName: "pipeline-runner",
21882
22032
  capScope: "system",
@@ -22243,6 +22393,12 @@ Object.freeze({
22243
22393
  addonId: null,
22244
22394
  access: "view"
22245
22395
  },
22396
+ "snapshot.getSnapshotOverview": {
22397
+ capName: "snapshot",
22398
+ capScope: "device",
22399
+ addonId: null,
22400
+ access: "view"
22401
+ },
22246
22402
  "snapshot.invalidateCache": {
22247
22403
  capName: "snapshot",
22248
22404
  capScope: "device",
@@ -22921,6 +23077,12 @@ Object.freeze({
22921
23077
  addonId: null,
22922
23078
  access: "view"
22923
23079
  },
23080
+ "userPasskeys.beginDiscoverableAuthentication": {
23081
+ capName: "user-passkeys",
23082
+ capScope: "system",
23083
+ addonId: null,
23084
+ access: "view"
23085
+ },
22924
23086
  "userPasskeys.beginRegistration": {
22925
23087
  capName: "user-passkeys",
22926
23088
  capScope: "system",
@@ -22933,12 +23095,24 @@ Object.freeze({
22933
23095
  addonId: null,
22934
23096
  access: "view"
22935
23097
  },
23098
+ "userPasskeys.finishDiscoverableAuthentication": {
23099
+ capName: "user-passkeys",
23100
+ capScope: "system",
23101
+ addonId: null,
23102
+ access: "view"
23103
+ },
22936
23104
  "userPasskeys.finishRegistration": {
22937
23105
  capName: "user-passkeys",
22938
23106
  capScope: "system",
22939
23107
  addonId: null,
22940
23108
  access: "create"
22941
23109
  },
23110
+ "userPasskeys.getSecondFactorPreference": {
23111
+ capName: "user-passkeys",
23112
+ capScope: "system",
23113
+ addonId: null,
23114
+ access: "view"
23115
+ },
22942
23116
  "userPasskeys.listPasskeys": {
22943
23117
  capName: "user-passkeys",
22944
23118
  capScope: "system",
@@ -22951,6 +23125,12 @@ Object.freeze({
22951
23125
  addonId: null,
22952
23126
  access: "delete"
22953
23127
  },
23128
+ "userPasskeys.setSecondFactorPreference": {
23129
+ capName: "user-passkeys",
23130
+ capScope: "system",
23131
+ addonId: null,
23132
+ access: "create"
23133
+ },
22954
23134
  "vacuumControl.locate": {
22955
23135
  capName: "vacuum-control",
22956
23136
  capScope: "device",
package/dist/index.mjs CHANGED
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-DJaTV2D7.mjs
4634
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6735,6 +6735,18 @@ function method(input, output, options) {
6735
6735
  timeoutMs: options?.timeoutMs
6736
6736
  };
6737
6737
  }
6738
+ /**
6739
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6740
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6741
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6742
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6743
+ */
6744
+ function systemMethod(input, output, options) {
6745
+ return {
6746
+ ...method(input, output, options),
6747
+ systemOnly: true
6748
+ };
6749
+ }
6738
6750
  var StaticDirOutputSchema$1 = object({ staticDir: string() });
6739
6751
  var VersionOutputSchema$1 = object({ version: string() });
6740
6752
  method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
@@ -10485,6 +10497,7 @@ var PipelineAddonSchemaSchema = object({
10485
10497
  defaultModelId: string(),
10486
10498
  defaultModelIdByFormat: record(string(), string()).optional(),
10487
10499
  enabledByDefault: boolean().optional(),
10500
+ backfillIntoExistingOverrides: boolean().optional(),
10488
10501
  defaultConfidence: number(),
10489
10502
  group: string().optional(),
10490
10503
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10791,6 +10804,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10791
10804
  auth: "admin"
10792
10805
  }), object({ zones: array(ZoneSchema).readonly() });
10793
10806
  /**
10807
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10808
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10809
+ * so the caller supplies only the detection-res bbox divided by the detection
10810
+ * dims — no native resolution to plumb.
10811
+ */
10812
+ var NativeCropBboxSchema = object({
10813
+ x: number(),
10814
+ y: number(),
10815
+ w: number(),
10816
+ h: number()
10817
+ });
10818
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10819
+ var NativeCropResultSchema = object({
10820
+ /** Packed rgb (24-bit) pixels of the crop. */
10821
+ bytes: _instanceof(Uint8Array),
10822
+ width: number().int().positive(),
10823
+ height: number().int().positive()
10824
+ });
10825
+ /**
10794
10826
  * Per-camera tunable ranges + defaults. Single source of truth used
10795
10827
  * by both the Zod data schema (validation + default fallback) and
10796
10828
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11046,7 +11078,11 @@ var RunnerLocalMetricsSchema = object({
11046
11078
  avgInferenceTimeMs: number(),
11047
11079
  queueDepth: number()
11048
11080
  });
11049
- 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());
11081
+ 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({
11082
+ handle: FrameHandleSchema,
11083
+ bbox: NativeCropBboxSchema,
11084
+ maxWidth: number().int().positive().optional()
11085
+ }), NativeCropResultSchema.nullable());
11050
11086
  object({
11051
11087
  detected: boolean(),
11052
11088
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -15214,7 +15250,17 @@ var TrackSchema = object({
15214
15250
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15215
15251
  totalDistance: number(),
15216
15252
  state: TrackStateSchema,
15217
- active: boolean()
15253
+ active: boolean(),
15254
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15255
+ * track expiry, recomputed on late label). Absent on legacy rows written
15256
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15257
+ importance: number().optional(),
15258
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15259
+ * "best" frame). Absent when the track produced no object events. */
15260
+ bestEventId: string().optional(),
15261
+ /** Tag of the importance sub-signal that dominated the score
15262
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15263
+ importanceReason: string().optional()
15218
15264
  });
15219
15265
  var BaseEventFields = {
15220
15266
  id: string(),
@@ -15279,8 +15325,18 @@ var ObjectEventSchema = object({
15279
15325
  frameHeight: number().optional(),
15280
15326
  /** MediaStore key for the crop attached to this event (if any). */
15281
15327
  mediaKey: string().optional(),
15328
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15329
+ * best-detection full frame). Resolve via the event-media data-plane
15330
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15331
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15332
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15333
+ keyFrameMediaKey: string().optional(),
15282
15334
  /** Populated by B5 (recording playback URL for this event). */
15283
- mediaUrl: string().optional()
15335
+ mediaUrl: string().optional(),
15336
+ /** The parent track's key-event importance [0,1], propagated to every object
15337
+ * event of the track (so an event row can be sorted by importance without a
15338
+ * track join). Absent on legacy rows / before the track was scored. */
15339
+ importance: number().optional()
15284
15340
  });
15285
15341
  var AudioEventSchema = object({
15286
15342
  ...BaseEventFields,
@@ -15304,7 +15360,8 @@ var MediaFileKindEnum = _enum([
15304
15360
  "fullFrame",
15305
15361
  "fullFrameBoxed",
15306
15362
  "faceCrop",
15307
- "plateCrop"
15363
+ "plateCrop",
15364
+ "keyFrame"
15308
15365
  ]);
15309
15366
  var MediaFileSchema = object({
15310
15367
  key: string(),
@@ -15325,6 +15382,32 @@ var DeviceEventQueryInput = object({
15325
15382
  projection: _enum(["full", "slim"]).optional()
15326
15383
  });
15327
15384
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15385
+ var KeyEventQueryInput = object({
15386
+ deviceId: number(),
15387
+ /** Window lower bound (track firstSeen ≥ since). */
15388
+ since: number(),
15389
+ /** Window upper bound (track firstSeen ≤ until). */
15390
+ until: number(),
15391
+ limit: number().int().min(1).max(200).default(50),
15392
+ /** Drop tracks scoring below this importance. */
15393
+ minImportance: number().min(0).max(1).optional(),
15394
+ /** Restrict to a single class (e.g. 'person'). */
15395
+ classFilter: string().optional()
15396
+ });
15397
+ var KeyEventSchema = object({
15398
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15399
+ id: string(),
15400
+ trackId: string(),
15401
+ /** Track start time (firstSeen). */
15402
+ timestamp: number(),
15403
+ className: string(),
15404
+ label: string().optional(),
15405
+ importance: number(),
15406
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15407
+ bestEventId: string(),
15408
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15409
+ windowMs: number().optional()
15410
+ });
15328
15411
  var TrackedDetectionSchema = object({
15329
15412
  trackId: string(),
15330
15413
  className: string(),
@@ -15354,7 +15437,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15354
15437
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15355
15438
  kind: "mutation",
15356
15439
  auth: "admin"
15357
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15440
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15358
15441
  deviceId: number(),
15359
15442
  since: number(),
15360
15443
  until: number(),
@@ -16121,7 +16204,12 @@ DeviceType.Camera, method(object({
16121
16204
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
16122
16205
  kind: "mutation",
16123
16206
  auth: "admin"
16124
- });
16207
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16208
+ deviceId: number(),
16209
+ lastCapturedAt: number().nullable(),
16210
+ cacheAgeMs: number().nullable(),
16211
+ etag: string().nullable()
16212
+ })));
16125
16213
  /**
16126
16214
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
16127
16215
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16372,10 +16460,32 @@ method(_void(), array(TurnServerSchema).readonly());
16372
16460
  * b. `finishAuthentication({userId, response})` → server verifies
16373
16461
  * the assertion, bumps the credential counter, returns ok.
16374
16462
  *
16463
+ * 2b. Usernameless (discoverable-credential) authentication — the
16464
+ * passkey IS the primary factor, no password leg:
16465
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16466
+ * EMPTY `allowCredentials` (the browser offers every resident
16467
+ * passkey it holds for this RP) + `userVerification: 'required'`
16468
+ * (the passkey replaces both factors, so UV is mandatory).
16469
+ * The challenge is stored server-side, NOT bound to any user.
16470
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16471
+ * resolves the credential by the response's credential id,
16472
+ * verifies the assertion against the stored challenge + that
16473
+ * credential's public key/counter, and returns the OWNING
16474
+ * `userId` — the caller (core auth router) mints the session.
16475
+ *
16375
16476
  * 3. Management:
16376
16477
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16377
16478
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16378
16479
  *
16480
+ * 4. Second-factor preference (opt-in, default OFF):
16481
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16482
+ * demanded as a second factor after a password login ONLY when the
16483
+ * user explicitly opts in via `setSecondFactorPreference`.
16484
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16485
+ * row ⇒ `enabled: false`).
16486
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16487
+ * the providing addon beside its credentials.
16488
+ *
16379
16489
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16380
16490
  * the admin-ui composes the begin/finish round-trip and never exposes
16381
16491
  * the cap to non-admins.
@@ -16418,6 +16528,17 @@ method(object({
16418
16528
  }), object({ verified: boolean() }), {
16419
16529
  kind: "mutation",
16420
16530
  access: "view"
16531
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16532
+ kind: "mutation",
16533
+ access: "view"
16534
+ }), method(object({
16535
+ /** AuthenticationResponseJSON from the browser. */
16536
+ response: record(string(), unknown()) }), object({
16537
+ verified: boolean(),
16538
+ userId: string().nullable()
16539
+ }), {
16540
+ kind: "mutation",
16541
+ access: "view"
16421
16542
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16422
16543
  userId: string(),
16423
16544
  credentialId: string()
@@ -16425,6 +16546,13 @@ method(object({
16425
16546
  kind: "mutation",
16426
16547
  auth: "admin",
16427
16548
  access: "delete"
16549
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16550
+ userId: string(),
16551
+ enabled: boolean()
16552
+ }), object({ success: literal(true) }), {
16553
+ kind: "mutation",
16554
+ auth: "admin",
16555
+ access: "create"
16428
16556
  });
16429
16557
  /**
16430
16558
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -17226,7 +17354,17 @@ var FaceInfoSchema = object({
17226
17354
  recognizedIdentityId: string().optional(),
17227
17355
  identityName: string().optional(),
17228
17356
  assigned: boolean(),
17229
- base64: string().optional()
17357
+ base64: string().optional(),
17358
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17359
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17360
+ * legacy rows written before design B. */
17361
+ faceBbox: BoundingBoxSchema.optional(),
17362
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17363
+ * Fetch the native JPEG via the event-media data-plane
17364
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17365
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17366
+ * back to the inline `base64` face crop. */
17367
+ keyFrameMediaKey: string().optional()
17230
17368
  });
17231
17369
  var FaceFilterEnum = _enum([
17232
17370
  "unassigned",
@@ -21345,6 +21483,12 @@ Object.freeze({
21345
21483
  addonId: null,
21346
21484
  access: "view"
21347
21485
  },
21486
+ "pipelineAnalytics.getKeyEvents": {
21487
+ capName: "pipeline-analytics",
21488
+ capScope: "device",
21489
+ addonId: null,
21490
+ access: "view"
21491
+ },
21348
21492
  "pipelineAnalytics.getMotionEvents": {
21349
21493
  capName: "pipeline-analytics",
21350
21494
  capScope: "device",
@@ -21873,6 +22017,12 @@ Object.freeze({
21873
22017
  addonId: null,
21874
22018
  access: "view"
21875
22019
  },
22020
+ "pipelineRunner.getNativeCrop": {
22021
+ capName: "pipeline-runner",
22022
+ capScope: "system",
22023
+ addonId: null,
22024
+ access: "view"
22025
+ },
21876
22026
  "pipelineRunner.reportMotion": {
21877
22027
  capName: "pipeline-runner",
21878
22028
  capScope: "system",
@@ -22239,6 +22389,12 @@ Object.freeze({
22239
22389
  addonId: null,
22240
22390
  access: "view"
22241
22391
  },
22392
+ "snapshot.getSnapshotOverview": {
22393
+ capName: "snapshot",
22394
+ capScope: "device",
22395
+ addonId: null,
22396
+ access: "view"
22397
+ },
22242
22398
  "snapshot.invalidateCache": {
22243
22399
  capName: "snapshot",
22244
22400
  capScope: "device",
@@ -22917,6 +23073,12 @@ Object.freeze({
22917
23073
  addonId: null,
22918
23074
  access: "view"
22919
23075
  },
23076
+ "userPasskeys.beginDiscoverableAuthentication": {
23077
+ capName: "user-passkeys",
23078
+ capScope: "system",
23079
+ addonId: null,
23080
+ access: "view"
23081
+ },
22920
23082
  "userPasskeys.beginRegistration": {
22921
23083
  capName: "user-passkeys",
22922
23084
  capScope: "system",
@@ -22929,12 +23091,24 @@ Object.freeze({
22929
23091
  addonId: null,
22930
23092
  access: "view"
22931
23093
  },
23094
+ "userPasskeys.finishDiscoverableAuthentication": {
23095
+ capName: "user-passkeys",
23096
+ capScope: "system",
23097
+ addonId: null,
23098
+ access: "view"
23099
+ },
22932
23100
  "userPasskeys.finishRegistration": {
22933
23101
  capName: "user-passkeys",
22934
23102
  capScope: "system",
22935
23103
  addonId: null,
22936
23104
  access: "create"
22937
23105
  },
23106
+ "userPasskeys.getSecondFactorPreference": {
23107
+ capName: "user-passkeys",
23108
+ capScope: "system",
23109
+ addonId: null,
23110
+ access: "view"
23111
+ },
22938
23112
  "userPasskeys.listPasskeys": {
22939
23113
  capName: "user-passkeys",
22940
23114
  capScope: "system",
@@ -22947,6 +23121,12 @@ Object.freeze({
22947
23121
  addonId: null,
22948
23122
  access: "delete"
22949
23123
  },
23124
+ "userPasskeys.setSecondFactorPreference": {
23125
+ capName: "user-passkeys",
23126
+ capScope: "system",
23127
+ addonId: null,
23128
+ access: "create"
23129
+ },
22950
23130
  "vacuumControl.locate": {
22951
23131
  capName: "vacuum-control",
22952
23132
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-ffmpeg",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Standalone ffmpeg-subprocess decoder fallback addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",