@camstack/addon-model-studio 1.0.20 → 1.0.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.
@@ -4661,7 +4661,7 @@ function _instanceof(cls, params = {}) {
4661
4661
  return inst;
4662
4662
  }
4663
4663
  //#endregion
4664
- //#region ../types/dist/sleep-DiQ8xW1M.mjs
4664
+ //#region ../types/dist/sleep-BC9Yqte7.mjs
4665
4665
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4666
4666
  EventCategory["SystemBoot"] = "system.boot";
4667
4667
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5382,10 +5382,6 @@ function hydrateField(field, values) {
5382
5382
  };
5383
5383
  }
5384
5384
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
5385
- if (field.type === "password") return {
5386
- ...field,
5387
- value: ""
5388
- };
5389
5385
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
5390
5386
  return {
5391
5387
  ...field,
@@ -6769,6 +6765,21 @@ function method(input, output, options) {
6769
6765
  timeoutMs: options?.timeoutMs
6770
6766
  };
6771
6767
  }
6768
+ /**
6769
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6770
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6771
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6772
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6773
+ */
6774
+ function systemMethod(input, output, options) {
6775
+ return {
6776
+ ...method(input, output, options),
6777
+ systemOnly: true
6778
+ };
6779
+ }
6780
+ var StaticDirOutputSchema$1 = object({ staticDir: string() });
6781
+ var VersionOutputSchema$1 = object({ version: string() });
6782
+ method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
6772
6783
  var StaticDirOutputSchema = object({ staticDir: string() });
6773
6784
  var VersionOutputSchema = object({ version: string() });
6774
6785
  method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
@@ -10535,6 +10546,7 @@ var PipelineAddonSchemaSchema = object({
10535
10546
  defaultModelId: string(),
10536
10547
  defaultModelIdByFormat: record(string(), string()).optional(),
10537
10548
  enabledByDefault: boolean().optional(),
10549
+ backfillIntoExistingOverrides: boolean().optional(),
10538
10550
  defaultConfidence: number(),
10539
10551
  group: string().optional(),
10540
10552
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10841,6 +10853,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10841
10853
  auth: "admin"
10842
10854
  }), object({ zones: array(ZoneSchema).readonly() });
10843
10855
  /**
10856
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
10857
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
10858
+ * so the caller supplies only the detection-res bbox divided by the detection
10859
+ * dims — no native resolution to plumb.
10860
+ */
10861
+ var NativeCropBboxSchema = object({
10862
+ x: number(),
10863
+ y: number(),
10864
+ w: number(),
10865
+ h: number()
10866
+ });
10867
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
10868
+ var NativeCropResultSchema = object({
10869
+ /** Packed rgb (24-bit) pixels of the crop. */
10870
+ bytes: _instanceof(Uint8Array),
10871
+ width: number().int().positive(),
10872
+ height: number().int().positive()
10873
+ });
10874
+ /**
10844
10875
  * Per-camera tunable ranges + defaults. Single source of truth used
10845
10876
  * by both the Zod data schema (validation + default fallback) and
10846
10877
  * the device settings UI (slider min/max/step). Touch one place and
@@ -11096,7 +11127,11 @@ var RunnerLocalMetricsSchema = object({
11096
11127
  avgInferenceTimeMs: number(),
11097
11128
  queueDepth: number()
11098
11129
  });
11099
- 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());
11130
+ 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({
11131
+ handle: FrameHandleSchema,
11132
+ bbox: NativeCropBboxSchema,
11133
+ maxWidth: number().int().positive().optional()
11134
+ }), NativeCropResultSchema.nullable());
11100
11135
  object({
11101
11136
  detected: boolean(),
11102
11137
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -12665,6 +12700,17 @@ var WidgetMetadataSchema = object({
12665
12700
  deviceContext: boolean().default(false),
12666
12701
  integrationContext: boolean().default(false)
12667
12702
  }),
12703
+ /**
12704
+ * Loadable BEFORE authentication. The normal widget registry listing
12705
+ * (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
12706
+ * (the login page) cannot discover a widget through it. A widget that
12707
+ * declares `preAuth: true` marks itself as safe to mount on a pre-auth
12708
+ * screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
12709
+ * login-method contribution channel (see `login-method.cap.ts`) rather
12710
+ * than the authenticated registry, and its bundle is served by the
12711
+ * public `/api/addon-widgets/:addonId/*` static route. Defaults false.
12712
+ */
12713
+ preAuth: boolean().optional().default(false),
12668
12714
  /** Dashboard placement HINTS (operator can override per instance). */
12669
12715
  defaultSize: WidgetSizeEnum.default("md"),
12670
12716
  allowedSizes: array(WidgetSizeEnum).readonly().default([
@@ -12966,6 +13012,66 @@ method(object({
12966
13012
  password: string()
12967
13013
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12968
13014
  /**
13015
+ * `login-method` — collection cap through which auth addons contribute
13016
+ * their pre-auth login surfaces to the login page. This is the SINGLE,
13017
+ * generic mechanism that supersedes the dead `auth.listProviders` reader:
13018
+ * every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
13019
+ * `login-method` provider and the PUBLIC `auth.listLoginMethods`
13020
+ * procedure aggregates them for the unauthenticated login page.
13021
+ *
13022
+ * A contribution is a discriminated union on `kind`:
13023
+ *
13024
+ * - `redirect` — a declarative button. The login page renders a generic
13025
+ * button that navigates to `startUrl` (an addon-owned HTTP route).
13026
+ * Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
13027
+ * ZERO shell-side JS. A future SSO addon plugs in the same way — the
13028
+ * login page needs NO change.
13029
+ *
13030
+ * - `widget` — a Module-Federation widget the login page mounts (via
13031
+ * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
13032
+ * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
13033
+ * addon bundle. The referenced widget also declares `preAuth: true` in
13034
+ * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
13035
+ * stamps a public `bundleUrl` from `addonId` + `bundle`.
13036
+ *
13037
+ * Every contribution carries a `stage`:
13038
+ * - `primary` — shown on the first credentials screen (OIDC /
13039
+ * magic-link buttons; a future usernameless passkey).
13040
+ * - `second-factor` — shown AFTER the password leg, gated on the
13041
+ * returned `factors` (passkey-as-2FA today).
13042
+ *
13043
+ * `mount: skip` — the cap is read server-side by the core auth router
13044
+ * (`registry.getCollection('login-method')`), never mounted as its own
13045
+ * tRPC router.
13046
+ */
13047
+ /** When a login method renders in the two-phase login flow. */
13048
+ var LoginStageEnum = _enum(["primary", "second-factor"]);
13049
+ /** One login-method contribution — redirect button OR pre-auth widget. */
13050
+ var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
13051
+ kind: literal("redirect"),
13052
+ /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
13053
+ id: string(),
13054
+ /** Operator-facing button label. */
13055
+ label: string(),
13056
+ /** lucide-react icon name. */
13057
+ icon: string().optional(),
13058
+ /** Addon-owned HTTP route the button navigates to (GET). */
13059
+ startUrl: string(),
13060
+ stage: LoginStageEnum
13061
+ }), object({
13062
+ kind: literal("widget"),
13063
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
13064
+ id: string(),
13065
+ /** Owning addon id — drives the public bundle URL + the MF namespace. */
13066
+ addonId: string(),
13067
+ /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
13068
+ bundle: string(),
13069
+ /** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
13070
+ remote: WidgetRemoteSchema,
13071
+ stage: LoginStageEnum
13072
+ })]);
13073
+ method(_void(), array(LoginMethodContributionSchema).readonly());
13074
+ /**
12969
13075
  * Orchestrator-side destination metadata. The orchestrator computes
12970
13076
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12971
13077
  * (admin UI, restore flow) see one canonical key.
@@ -15102,7 +15208,17 @@ var TrackSchema = object({
15102
15208
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
15103
15209
  totalDistance: number(),
15104
15210
  state: TrackStateSchema,
15105
- active: boolean()
15211
+ active: boolean(),
15212
+ /** Deterministic key-event importance score in [0,1] (server-computed at
15213
+ * track expiry, recomputed on late label). Absent on legacy rows written
15214
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
15215
+ importance: number().optional(),
15216
+ /** Id of the track's highest-confidence ObjectEvent (its representative
15217
+ * "best" frame). Absent when the track produced no object events. */
15218
+ bestEventId: string().optional(),
15219
+ /** Tag of the importance sub-signal that dominated the score
15220
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
15221
+ importanceReason: string().optional()
15106
15222
  });
15107
15223
  var BaseEventFields = {
15108
15224
  id: string(),
@@ -15167,8 +15283,18 @@ var ObjectEventSchema = object({
15167
15283
  frameHeight: number().optional(),
15168
15284
  /** MediaStore key for the crop attached to this event (if any). */
15169
15285
  mediaKey: string().optional(),
15286
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
15287
+ * best-detection full frame). Resolve via the event-media data-plane
15288
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
15289
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
15290
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
15291
+ keyFrameMediaKey: string().optional(),
15170
15292
  /** Populated by B5 (recording playback URL for this event). */
15171
- mediaUrl: string().optional()
15293
+ mediaUrl: string().optional(),
15294
+ /** The parent track's key-event importance [0,1], propagated to every object
15295
+ * event of the track (so an event row can be sorted by importance without a
15296
+ * track join). Absent on legacy rows / before the track was scored. */
15297
+ importance: number().optional()
15172
15298
  });
15173
15299
  var AudioEventSchema = object({
15174
15300
  ...BaseEventFields,
@@ -15192,7 +15318,8 @@ var MediaFileKindEnum = _enum([
15192
15318
  "fullFrame",
15193
15319
  "fullFrameBoxed",
15194
15320
  "faceCrop",
15195
- "plateCrop"
15321
+ "plateCrop",
15322
+ "keyFrame"
15196
15323
  ]);
15197
15324
  var MediaFileSchema = object({
15198
15325
  key: string(),
@@ -15213,6 +15340,32 @@ var DeviceEventQueryInput = object({
15213
15340
  projection: _enum(["full", "slim"]).optional()
15214
15341
  });
15215
15342
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
15343
+ var KeyEventQueryInput = object({
15344
+ deviceId: number(),
15345
+ /** Window lower bound (track firstSeen ≥ since). */
15346
+ since: number(),
15347
+ /** Window upper bound (track firstSeen ≤ until). */
15348
+ until: number(),
15349
+ limit: number().int().min(1).max(200).default(50),
15350
+ /** Drop tracks scoring below this importance. */
15351
+ minImportance: number().min(0).max(1).optional(),
15352
+ /** Restrict to a single class (e.g. 'person'). */
15353
+ classFilter: string().optional()
15354
+ });
15355
+ var KeyEventSchema = object({
15356
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
15357
+ id: string(),
15358
+ trackId: string(),
15359
+ /** Track start time (firstSeen). */
15360
+ timestamp: number(),
15361
+ className: string(),
15362
+ label: string().optional(),
15363
+ importance: number(),
15364
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
15365
+ bestEventId: string(),
15366
+ /** Track lifetime in ms (lastSeen - firstSeen). */
15367
+ windowMs: number().optional()
15368
+ });
15216
15369
  var TrackedDetectionSchema = object({
15217
15370
  trackId: string(),
15218
15371
  className: string(),
@@ -15242,7 +15395,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15242
15395
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15243
15396
  kind: "mutation",
15244
15397
  auth: "admin"
15245
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
15398
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
15246
15399
  deviceId: number(),
15247
15400
  since: number(),
15248
15401
  until: number(),
@@ -15700,6 +15853,131 @@ method(object({
15700
15853
  auth: "admin"
15701
15854
  });
15702
15855
  /**
15856
+ * server-management — per-NODE singleton capability for a node's ROOT
15857
+ * package lifecycle (runtime-updatable node packages, phase 2: hub + docker
15858
+ * agents).
15859
+ *
15860
+ * Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
15861
+ * on agents) carries the whole software stack in its npm dep tree, so ONE
15862
+ * version describes the node. Updates install into
15863
+ * `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
15864
+ * starter (probation boot + auto-rollback to N-1).
15865
+ *
15866
+ * Providers:
15867
+ * - HUB: `ServerUpdateService` behind the `server-provided` mount
15868
+ * (`buildServerProviders` in trpc.router.ts) — the default target for
15869
+ * unpinned calls.
15870
+ * - AGENT: `AgentUpdateService` registered by the agent bootstrap under
15871
+ * the synthetic `agent-runtime` addonId and declared in the agent's
15872
+ * `$hub.registerNode` manifest.
15873
+ *
15874
+ * Node routing: singleton caps get the codegen/runtime-builder `nodeId`
15875
+ * injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
15876
+ * SDK) routes the call to that node's provider via the standard remote
15877
+ * proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
15878
+ * in-process provider lookup). No `nodeId` → the hub's own provider.
15879
+ *
15880
+ * Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
15881
+ */
15882
+ /**
15883
+ * Where the running hub's code was loaded from:
15884
+ * - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
15885
+ * plain resolution and runtime updates are refused.
15886
+ * - `baked` — the immutable image seed closure (no data-dir root active).
15887
+ * - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
15888
+ */
15889
+ var ServerBootModeSchema = _enum([
15890
+ "workspace",
15891
+ "baked",
15892
+ "data-root"
15893
+ ]);
15894
+ /**
15895
+ * Update lifecycle state:
15896
+ * - `idle` / `checking` / `staging` — steady / in-flight registry work.
15897
+ * - `pending-restart` — a version is staged and the node has NOT yet
15898
+ * restarted onto it (still running the OLD version).
15899
+ * - `awaiting-confirmation` — the node HAS restarted onto the staged version
15900
+ * (it is the active probation boot) and is waiting to confirm boot-health.
15901
+ * Apply/rollback are refused in this state and the node must NOT be
15902
+ * manually restarted, or the probation boot auto-rolls-back.
15903
+ */
15904
+ var ServerUpdateStateSchema = _enum([
15905
+ "idle",
15906
+ "checking",
15907
+ "staging",
15908
+ "pending-restart",
15909
+ "awaiting-confirmation"
15910
+ ]);
15911
+ var ServerRollbackInfoSchema = object({
15912
+ /** The version that failed (or was manually rolled back). */
15913
+ fromVersion: string(),
15914
+ /** The version rolled back to; null = the baked seed. */
15915
+ toVersion: string().nullable(),
15916
+ atMs: number(),
15917
+ reason: string()
15918
+ });
15919
+ var ServerPackageStatusSchema = object({
15920
+ /** Root package name (`@camstack/server` on the hub). */
15921
+ packageName: string(),
15922
+ /** Version of the code the running process ACTUALLY loaded. */
15923
+ runningVersion: string().nullable(),
15924
+ /** Node.js runtime version the node's process runs on (`process.versions.node`). */
15925
+ nodeRuntimeVersion: string().nullable(),
15926
+ /** Active data-dir root version; null when booted from seed/workspace. */
15927
+ activeVersion: string().nullable(),
15928
+ /** N-1 version kept for rollback; null when no previous version exists. */
15929
+ previousVersion: string().nullable(),
15930
+ /** Version of the immutable baked seed closure (image fallback). */
15931
+ seedVersion: string().nullable(),
15932
+ /** Latest registry version from the most recent check (null = never checked). */
15933
+ latestVersion: string().nullable(),
15934
+ updateAvailable: boolean(),
15935
+ bootMode: ServerBootModeSchema,
15936
+ updateState: ServerUpdateStateSchema,
15937
+ /** Version staged + awaiting its probation boot, when one is pending. */
15938
+ pendingVersion: string().nullable(),
15939
+ /** Set when the last freshly-activated version failed its boot health-check. */
15940
+ rolledBack: ServerRollbackInfoSchema.nullable(),
15941
+ /**
15942
+ * True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
15943
+ * hub is running from the baked seed (or workspace) while installed data-dir
15944
+ * versions are being IGNORED. Surfaced as a warning in the UI.
15945
+ */
15946
+ stateFileCorrupt: boolean(),
15947
+ lastCheckedAtMs: number().nullable()
15948
+ });
15949
+ var ServerUpdateCheckResultSchema = object({
15950
+ packageName: string(),
15951
+ runningVersion: string().nullable(),
15952
+ latestVersion: string().nullable(),
15953
+ updateAvailable: boolean(),
15954
+ checkedAtMs: number(),
15955
+ /** Non-null when the registry lookup failed (offline, bad registry, …). */
15956
+ error: string().nullable()
15957
+ });
15958
+ var ServerUpdateActionResultSchema = object({
15959
+ accepted: boolean(),
15960
+ targetVersion: string().nullable(),
15961
+ /** True when a graceful restart was scheduled to apply the change. */
15962
+ restarting: boolean(),
15963
+ message: string()
15964
+ });
15965
+ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
15966
+ kind: "mutation",
15967
+ auth: "admin"
15968
+ }), method(object({
15969
+ /** Explicit target version; omitted = latest from the registry. */
15970
+ version: string().optional() }), ServerUpdateActionResultSchema, {
15971
+ kind: "mutation",
15972
+ auth: "admin"
15973
+ }), method(_void(), ServerUpdateActionResultSchema, {
15974
+ kind: "mutation",
15975
+ auth: "admin"
15976
+ }), method(_void(), ServerUpdateActionResultSchema, {
15977
+ kind: "mutation",
15978
+ auth: "admin"
15979
+ });
15980
+ /**
15703
15981
  * Query filter for settings-store collections.
15704
15982
  */
15705
15983
  var QueryFilterSchema = object({
@@ -15884,7 +16162,12 @@ DeviceType.Camera, method(object({
15884
16162
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
15885
16163
  kind: "mutation",
15886
16164
  auth: "admin"
15887
- });
16165
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
16166
+ deviceId: number(),
16167
+ lastCapturedAt: number().nullable(),
16168
+ cacheAgeMs: number().nullable(),
16169
+ etag: string().nullable()
16170
+ })));
15888
16171
  /**
15889
16172
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
15890
16173
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16135,10 +16418,32 @@ method(_void(), array(TurnServerSchema).readonly());
16135
16418
  * b. `finishAuthentication({userId, response})` → server verifies
16136
16419
  * the assertion, bumps the credential counter, returns ok.
16137
16420
  *
16421
+ * 2b. Usernameless (discoverable-credential) authentication — the
16422
+ * passkey IS the primary factor, no password leg:
16423
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16424
+ * EMPTY `allowCredentials` (the browser offers every resident
16425
+ * passkey it holds for this RP) + `userVerification: 'required'`
16426
+ * (the passkey replaces both factors, so UV is mandatory).
16427
+ * The challenge is stored server-side, NOT bound to any user.
16428
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16429
+ * resolves the credential by the response's credential id,
16430
+ * verifies the assertion against the stored challenge + that
16431
+ * credential's public key/counter, and returns the OWNING
16432
+ * `userId` — the caller (core auth router) mints the session.
16433
+ *
16138
16434
  * 3. Management:
16139
16435
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16140
16436
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16141
16437
  *
16438
+ * 4. Second-factor preference (opt-in, default OFF):
16439
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16440
+ * demanded as a second factor after a password login ONLY when the
16441
+ * user explicitly opts in via `setSecondFactorPreference`.
16442
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16443
+ * row ⇒ `enabled: false`).
16444
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16445
+ * the providing addon beside its credentials.
16446
+ *
16142
16447
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16143
16448
  * the admin-ui composes the begin/finish round-trip and never exposes
16144
16449
  * the cap to non-admins.
@@ -16181,6 +16486,17 @@ method(object({
16181
16486
  }), object({ verified: boolean() }), {
16182
16487
  kind: "mutation",
16183
16488
  access: "view"
16489
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16490
+ kind: "mutation",
16491
+ access: "view"
16492
+ }), method(object({
16493
+ /** AuthenticationResponseJSON from the browser. */
16494
+ response: record(string(), unknown()) }), object({
16495
+ verified: boolean(),
16496
+ userId: string().nullable()
16497
+ }), {
16498
+ kind: "mutation",
16499
+ access: "view"
16184
16500
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16185
16501
  userId: string(),
16186
16502
  credentialId: string()
@@ -16188,6 +16504,13 @@ method(object({
16188
16504
  kind: "mutation",
16189
16505
  auth: "admin",
16190
16506
  access: "delete"
16507
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16508
+ userId: string(),
16509
+ enabled: boolean()
16510
+ }), object({ success: literal(true) }), {
16511
+ kind: "mutation",
16512
+ auth: "admin",
16513
+ access: "create"
16191
16514
  });
16192
16515
  /**
16193
16516
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -16989,7 +17312,17 @@ var FaceInfoSchema = object({
16989
17312
  recognizedIdentityId: string().optional(),
16990
17313
  identityName: string().optional(),
16991
17314
  assigned: boolean(),
16992
- base64: string().optional()
17315
+ base64: string().optional(),
17316
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
17317
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
17318
+ * legacy rows written before design B. */
17319
+ faceBbox: BoundingBoxSchema.optional(),
17320
+ /** Design B: MediaStore key of the track's native-resolution key frame.
17321
+ * Fetch the native JPEG via the event-media data-plane
17322
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
17323
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
17324
+ * back to the inline `base64` face crop. */
17325
+ keyFrameMediaKey: string().optional()
16993
17326
  });
16994
17327
  var FaceFilterEnum = _enum([
16995
17328
  "unassigned",
@@ -17686,6 +18019,16 @@ var TopologyCategorySchema = object({
17686
18019
  healthy: number(),
17687
18020
  addons: array(TopologyCategoryAddonSchema).readonly()
17688
18021
  });
18022
+ /**
18023
+ * The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
18024
+ * `@camstack/agent` on agents) as reported by its `registerNode` manifest —
18025
+ * version visibility for the Server management surface. Nullable: offline
18026
+ * rows and pre-phase-2 nodes report none.
18027
+ */
18028
+ var TopologyRootPackageSchema = object({
18029
+ name: string(),
18030
+ version: string()
18031
+ });
17689
18032
  var TopologyNodeSchema = object({
17690
18033
  id: string(),
17691
18034
  name: string(),
@@ -17709,7 +18052,8 @@ var TopologyNodeSchema = object({
17709
18052
  status: string()
17710
18053
  })).readonly(),
17711
18054
  processes: array(TopologyProcessSchema).readonly(),
17712
- categories: array(TopologyCategorySchema).readonly()
18055
+ categories: array(TopologyCategorySchema).readonly(),
18056
+ rootPackage: TopologyRootPackageSchema.nullable()
17713
18057
  });
17714
18058
  var CapUsageEdgeSchema = object({
17715
18059
  callerAddonId: string(),
@@ -20509,6 +20853,12 @@ Object.freeze({
20509
20853
  addonId: null,
20510
20854
  access: "create"
20511
20855
  },
20856
+ "loginMethod.getLoginMethods": {
20857
+ capName: "login-method",
20858
+ capScope: "system",
20859
+ addonId: null,
20860
+ access: "view"
20861
+ },
20512
20862
  "mediaPlayer.next": {
20513
20863
  capName: "media-player",
20514
20864
  capScope: "device",
@@ -21091,6 +21441,12 @@ Object.freeze({
21091
21441
  addonId: null,
21092
21442
  access: "view"
21093
21443
  },
21444
+ "pipelineAnalytics.getKeyEvents": {
21445
+ capName: "pipeline-analytics",
21446
+ capScope: "device",
21447
+ addonId: null,
21448
+ access: "view"
21449
+ },
21094
21450
  "pipelineAnalytics.getMotionEvents": {
21095
21451
  capName: "pipeline-analytics",
21096
21452
  capScope: "device",
@@ -21619,6 +21975,12 @@ Object.freeze({
21619
21975
  addonId: null,
21620
21976
  access: "view"
21621
21977
  },
21978
+ "pipelineRunner.getNativeCrop": {
21979
+ capName: "pipeline-runner",
21980
+ capScope: "system",
21981
+ addonId: null,
21982
+ access: "view"
21983
+ },
21622
21984
  "pipelineRunner.reportMotion": {
21623
21985
  capName: "pipeline-runner",
21624
21986
  capScope: "system",
@@ -21871,6 +22233,36 @@ Object.freeze({
21871
22233
  addonId: null,
21872
22234
  access: "create"
21873
22235
  },
22236
+ "serverManagement.applyServerUpdate": {
22237
+ capName: "server-management",
22238
+ capScope: "system",
22239
+ addonId: null,
22240
+ access: "create"
22241
+ },
22242
+ "serverManagement.checkServerUpdate": {
22243
+ capName: "server-management",
22244
+ capScope: "system",
22245
+ addonId: null,
22246
+ access: "create"
22247
+ },
22248
+ "serverManagement.getServerPackageStatus": {
22249
+ capName: "server-management",
22250
+ capScope: "system",
22251
+ addonId: null,
22252
+ access: "view"
22253
+ },
22254
+ "serverManagement.restartServer": {
22255
+ capName: "server-management",
22256
+ capScope: "system",
22257
+ addonId: null,
22258
+ access: "create"
22259
+ },
22260
+ "serverManagement.rollbackServerUpdate": {
22261
+ capName: "server-management",
22262
+ capScope: "system",
22263
+ addonId: null,
22264
+ access: "create"
22265
+ },
21874
22266
  "settingsStore.count": {
21875
22267
  capName: "settings-store",
21876
22268
  capScope: "system",
@@ -21955,6 +22347,12 @@ Object.freeze({
21955
22347
  addonId: null,
21956
22348
  access: "view"
21957
22349
  },
22350
+ "snapshot.getSnapshotOverview": {
22351
+ capName: "snapshot",
22352
+ capScope: "device",
22353
+ addonId: null,
22354
+ access: "view"
22355
+ },
21958
22356
  "snapshot.invalidateCache": {
21959
22357
  capName: "snapshot",
21960
22358
  capScope: "device",
@@ -22633,6 +23031,12 @@ Object.freeze({
22633
23031
  addonId: null,
22634
23032
  access: "view"
22635
23033
  },
23034
+ "userPasskeys.beginDiscoverableAuthentication": {
23035
+ capName: "user-passkeys",
23036
+ capScope: "system",
23037
+ addonId: null,
23038
+ access: "view"
23039
+ },
22636
23040
  "userPasskeys.beginRegistration": {
22637
23041
  capName: "user-passkeys",
22638
23042
  capScope: "system",
@@ -22645,12 +23049,24 @@ Object.freeze({
22645
23049
  addonId: null,
22646
23050
  access: "view"
22647
23051
  },
23052
+ "userPasskeys.finishDiscoverableAuthentication": {
23053
+ capName: "user-passkeys",
23054
+ capScope: "system",
23055
+ addonId: null,
23056
+ access: "view"
23057
+ },
22648
23058
  "userPasskeys.finishRegistration": {
22649
23059
  capName: "user-passkeys",
22650
23060
  capScope: "system",
22651
23061
  addonId: null,
22652
23062
  access: "create"
22653
23063
  },
23064
+ "userPasskeys.getSecondFactorPreference": {
23065
+ capName: "user-passkeys",
23066
+ capScope: "system",
23067
+ addonId: null,
23068
+ access: "view"
23069
+ },
22654
23070
  "userPasskeys.listPasskeys": {
22655
23071
  capName: "user-passkeys",
22656
23072
  capScope: "system",
@@ -22663,6 +23079,12 @@ Object.freeze({
22663
23079
  addonId: null,
22664
23080
  access: "delete"
22665
23081
  },
23082
+ "userPasskeys.setSecondFactorPreference": {
23083
+ capName: "user-passkeys",
23084
+ capScope: "system",
23085
+ addonId: null,
23086
+ access: "create"
23087
+ },
22666
23088
  "vacuumControl.locate": {
22667
23089
  capName: "vacuum-control",
22668
23090
  capScope: "device",
@@ -22735,6 +23157,18 @@ Object.freeze({
22735
23157
  addonId: null,
22736
23158
  access: "view"
22737
23159
  },
23160
+ "viewerUi.getStaticDir": {
23161
+ capName: "viewer-ui",
23162
+ capScope: "system",
23163
+ addonId: null,
23164
+ access: "view"
23165
+ },
23166
+ "viewerUi.getVersion": {
23167
+ capName: "viewer-ui",
23168
+ capScope: "system",
23169
+ addonId: null,
23170
+ access: "view"
23171
+ },
22738
23172
  "waterHeater.setAway": {
22739
23173
  capName: "water-heater",
22740
23174
  capScope: "device",