@camstack/addon-cloudflare 1.1.20 → 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-CZDdRBua.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";
@@ -4813,6 +4813,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4813
4813
  */
4814
4814
  EventCategory["PipelineCameraUpdated"] = "pipeline.camera-updated";
4815
4815
  /**
4816
+ * The cluster camera-source OWNER changed (`clusterRoles.ingestNode`).
4817
+ * Emitted by addon-pipeline-orchestrator whenever it (re)derives node
4818
+ * capabilities — at boot, on agent online/offline, and on an ingest-node
4819
+ * flip. Carries the resolved `ownerNodeId`. The stream-broker consumes it to
4820
+ * keep its ingest-owner-gate decision current WITHOUT a per-`ensureBroker`
4821
+ * cross-process `getIngestOwner` query (push the authority's decision instead
4822
+ * of polling it on the hot path). Idempotent state — re-emitted on every
4823
+ * topology change, so a dropped event self-heals on the next one (plus the
4824
+ * broker's long backstop reconcile query).
4825
+ */
4826
+ EventCategory["PipelineIngestOwnerChanged"] = "pipeline.ingest-owner-changed";
4827
+ /**
4816
4828
  * Periodic snapshot of per-node pipeline-runner load
4817
4829
  * (`RunnerLocalLoad`). Emitted ~1Hz by every runner so UI dashboards
4818
4830
  * subscribe instead of polling `pipelineRunner.getLocalLoad`.
@@ -5336,10 +5348,6 @@ function hydrateField(field, values) {
5336
5348
  };
5337
5349
  }
5338
5350
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
5339
- if (field.type === "password") return {
5340
- ...field,
5341
- value: ""
5342
- };
5343
5351
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
5344
5352
  return {
5345
5353
  ...field,
@@ -6723,6 +6731,21 @@ function method(input, output, options) {
6723
6731
  timeoutMs: options?.timeoutMs
6724
6732
  };
6725
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
+ }
6746
+ var StaticDirOutputSchema$1 = object({ staticDir: string() });
6747
+ var VersionOutputSchema$1 = object({ version: string() });
6748
+ method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
6726
6749
  var StaticDirOutputSchema = object({ staticDir: string() });
6727
6750
  var VersionOutputSchema = object({ version: string() });
6728
6751
  method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
@@ -6892,6 +6915,36 @@ var ModelFormatsSchema = object({
6892
6915
  tflite: ModelFormatEntrySchema.optional(),
6893
6916
  pt: ModelFormatEntrySchema.optional()
6894
6917
  });
6918
+ /**
6919
+ * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
6920
+ * the reduced `PipelineModelOption` returned in `pipeline.getSchema()` so the
6921
+ * grouped Family→Tier→Variant picker renders identically in the config UI and
6922
+ * in the pipeline/device steppers. The flat `id` stays the source of truth for
6923
+ * resolution/download/persistence; this is a presentation overlay resolved back
6924
+ * to an `id`.
6925
+ */
6926
+ var ModelVariantGroupSchema = object({
6927
+ /** Top-level family, e.g. `yolo26` (later `d-fine`, `rf-detr`). */
6928
+ family: string(),
6929
+ /** Size within the family, e.g. `n` | `s` | `m` | `l`. */
6930
+ tier: string(),
6931
+ /** Quantization axis. Omit ⇒ the fp32 base build. */
6932
+ precision: _enum(["fp32", "int8"]).optional(),
6933
+ /**
6934
+ * Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
6935
+ * latency-optimized export (e.g. ReLU-activation variant) — the slot the
6936
+ * future performance variants plug into.
6937
+ */
6938
+ optimization: _enum(["standard", "fast"]).optional(),
6939
+ /**
6940
+ * Input-resolution axis (square input side, px). Omit ⇒ the family's native
6941
+ * resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
6942
+ * cheap latency lever — especially on Apple ANE and the Intel N100 — at a
6943
+ * small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
6944
+ * the group so the selector can offer it as a variant axis.
6945
+ */
6946
+ resolution: number().int().positive().optional()
6947
+ });
6895
6948
  var ModelCatalogEntrySchema = object({
6896
6949
  id: string(),
6897
6950
  name: string(),
@@ -6921,7 +6974,43 @@ var ModelCatalogEntrySchema = object({
6921
6974
  * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
6922
6975
  * Downloaded into the same modelsDir alongside the model file.
6923
6976
  */
6924
- extraFiles: array(ModelExtraFileSchema).readonly().optional()
6977
+ extraFiles: array(ModelExtraFileSchema).readonly().optional(),
6978
+ /**
6979
+ * LEGACY entry — retained in the catalog so a persisted operator selection
6980
+ * still RESOLVES (and can be re-activated), but hidden from the selectable
6981
+ * model list and excluded from the auto format-default pick. Set on the
6982
+ * superseded / consolidated models (older lineages, redundant fp16 IRs) so
6983
+ * the active lineup stays the coherent curated ladder without deleting a
6984
+ * model anyone may still be pinned to. `resolveModelForFormat` keeps honoring
6985
+ * an explicit legacy id that has a build for the node's format.
6986
+ */
6987
+ legacy: boolean().optional(),
6988
+ /**
6989
+ * Measured quality/latency metadata — populated from the benchmark addon on
6990
+ * the real node classes. Absent = not yet measured (most entries today; the
6991
+ * catalog historically carried only `sizeMB`, a poor cross-architecture
6992
+ * speed proxy). `p95LatencyMs` is keyed by node class (e.g. `n100`, `mac`).
6993
+ */
6994
+ metrics: object({
6995
+ map50: number().optional(),
6996
+ p95LatencyMs: record(string(), number()).optional()
6997
+ }).optional(),
6998
+ /**
6999
+ * SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
7000
+ * YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
7001
+ * the retraining addon and any future commercial distribution.
7002
+ */
7003
+ license: string().optional(),
7004
+ /**
7005
+ * Variant-selector grouping. The UI groups models by `family` + `tier` and
7006
+ * offers `precision` / `optimization` as variant axes WITHIN a tier — so all
7007
+ * of a family's sizes and quantizations collapse into one grouped picker
7008
+ * instead of a flat list of `yolo26s`, `yolo26s-int8`, … Absent ⇒ ungrouped
7009
+ * (legacy / custom models) — never shown in the grouped selector. The flat
7010
+ * `id` stays the source of truth for resolution/download/persistence; grouping
7011
+ * is a presentation overlay resolved back to an `id`.
7012
+ */
7013
+ group: ModelVariantGroupSchema.optional()
6925
7014
  });
6926
7015
  var ConvertTargetSchema = discriminatedUnion("format", [object({
6927
7016
  format: literal("openvino"),
@@ -6982,8 +7071,8 @@ var RecordingModeSchema = _enum([
6982
7071
  "onAudioThreshold"
6983
7072
  ]);
6984
7073
  /**
6985
- * First-class, authoritative per-camera storage mode — the netta choice the UI
6986
- * reads directly (never inferred from `rules`):
7074
+ * First-class, authoritative per-camera storage mode — the explicit choice the
7075
+ * UI reads directly (never inferred from `rules`):
6987
7076
  * - `off` — not recording.
6988
7077
  * - `events` — record only around triggers (motion / audio threshold),
6989
7078
  * with pre/post-buffer.
@@ -8631,26 +8720,13 @@ DeviceType.Light, method(object({
8631
8720
  percentage: number().min(0).max(100),
8632
8721
  lastChangedAt: number()
8633
8722
  });
8723
+ /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
8634
8724
  var StreamFormatSchema = _enum([
8635
8725
  "webrtc",
8636
8726
  "hls",
8637
8727
  "mjpeg",
8638
8728
  "rtsp"
8639
8729
  ]);
8640
- var StreamInfoSchema = object({
8641
- streamId: string(),
8642
- format: StreamFormatSchema,
8643
- url: string().nullable(),
8644
- active: boolean()
8645
- });
8646
- method(object({
8647
- streamId: string(),
8648
- sourceUrl: string(),
8649
- codec: string().optional()
8650
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
8651
- streamId: string(),
8652
- format: StreamFormatSchema
8653
- }), string().nullable()), method(_void(), array(StreamInfoSchema));
8654
8730
  var RtspRestreamEntrySchema = object({
8655
8731
  brokerId: string(),
8656
8732
  url: string(),
@@ -9315,7 +9391,7 @@ var ConsumablesStatusSchema = object({
9315
9391
  })),
9316
9392
  lastChangedAt: number()
9317
9393
  });
9318
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, method(object({
9394
+ Object.values(DeviceType), method(object({
9319
9395
  deviceId: number().int().nonnegative(),
9320
9396
  key: string().min(1)
9321
9397
  }), _void(), {
@@ -10230,7 +10306,7 @@ var BoundingBoxSchema = object({
10230
10306
  w: number(),
10231
10307
  h: number()
10232
10308
  });
10233
- var SpatialDetectionSchema = object({
10309
+ object({
10234
10310
  class: string(),
10235
10311
  originalClass: string(),
10236
10312
  score: number(),
@@ -10365,7 +10441,6 @@ var PipelineDefaultStepSchema = lazy(() => object({
10365
10441
  enabled: boolean(),
10366
10442
  modelId: string(),
10367
10443
  children: array(PipelineDefaultStepSchema).readonly(),
10368
- engine: PipelineEngineChoiceSchema.optional(),
10369
10444
  group: string().optional(),
10370
10445
  settings: record(string(), unknown()).optional()
10371
10446
  }));
@@ -10390,7 +10465,9 @@ var PipelineModelOptionSchema = object({
10390
10465
  formats: record(string(), object({
10391
10466
  downloaded: boolean(),
10392
10467
  sizeMB: number()
10393
- }))
10468
+ })),
10469
+ group: ModelVariantGroupSchema.optional(),
10470
+ legacy: boolean().optional()
10394
10471
  });
10395
10472
  var ConfigFieldBridge = custom();
10396
10473
  var PipelineAddonSchemaSchema = object({
@@ -10404,6 +10481,7 @@ var PipelineAddonSchemaSchema = object({
10404
10481
  defaultModelId: string(),
10405
10482
  defaultModelIdByFormat: record(string(), string()).optional(),
10406
10483
  enabledByDefault: boolean().optional(),
10484
+ backfillIntoExistingOverrides: boolean().optional(),
10407
10485
  defaultConfidence: number(),
10408
10486
  group: string().optional(),
10409
10487
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10420,11 +10498,6 @@ var PipelineSchemaSchema = object({
10420
10498
  selectedEngine: PipelineEngineChoiceSchema,
10421
10499
  slots: array(PipelineSlotSchemaSchema).readonly()
10422
10500
  });
10423
- var DetectorOutputSchema = object({
10424
- detections: array(SpatialDetectionSchema).readonly(),
10425
- inferenceMs: number(),
10426
- modelId: string()
10427
- });
10428
10501
  var EngineProvisioningSchema = object({
10429
10502
  runtimeId: _enum([
10430
10503
  "onnx",
@@ -10441,15 +10514,42 @@ var EngineProvisioningSchema = object({
10441
10514
  ]),
10442
10515
  progress: number().optional(),
10443
10516
  error: string().optional(),
10444
- nextRetryAt: number().optional()
10517
+ nextRetryAt: number().optional(),
10518
+ /**
10519
+ * Gate A (config-correctness gate at engine change): human-readable
10520
+ * config issues surfaced EAGERLY when the node's engine changes — model
10521
+ * substitutions ("chose X, running Y") and zero-build steps ("no model
10522
+ * has a <format> build"). Additive/optional: informational only, never
10523
+ * enforced here — `assertEngineReady` (readiness) still gates inference.
10524
+ * Absent/empty when the node-default tree resolves cleanly.
10525
+ */
10526
+ configIssues: array(string()).optional()
10445
10527
  });
10446
10528
  var PipelineStepInputSchema = lazy(() => object({
10447
10529
  addonId: string(),
10448
- modelId: string(),
10530
+ modelId: string().optional(),
10449
10531
  enabled: boolean().default(true),
10450
10532
  children: array(PipelineStepInputSchema).optional(),
10451
10533
  settings: record(string(), unknown()).optional()
10452
10534
  }));
10535
+ var ModelSubstitutionSchema = object({
10536
+ addonId: string(),
10537
+ chosen: string(),
10538
+ running: string(),
10539
+ format: string()
10540
+ });
10541
+ var PipelineValidationIssueSchema = object({
10542
+ addonId: string(),
10543
+ kind: _enum(["unknown-addon", "no-format-build"]),
10544
+ detail: string()
10545
+ });
10546
+ var PipelineValidationResultSchema = object({
10547
+ ok: boolean(),
10548
+ issues: array(PipelineValidationIssueSchema).readonly(),
10549
+ substitutions: array(ModelSubstitutionSchema).readonly(),
10550
+ /** The node's `currentEngine.format` this validation ran against. */
10551
+ format: string()
10552
+ });
10453
10553
  var ReferenceImageEntrySchema = object({
10454
10554
  filename: string(),
10455
10555
  stepIds: array(string()).readonly().optional()
@@ -10520,7 +10620,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
10520
10620
  })) }), object({ success: literal(true) }), {
10521
10621
  kind: "mutation",
10522
10622
  auth: "admin"
10523
- }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
10623
+ }), method(object({ nodeId: string() }), object({
10624
+ success: literal(true),
10625
+ clearedDevices: number()
10626
+ }), {
10627
+ kind: "mutation",
10628
+ auth: "admin"
10629
+ }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({ steps: array(PipelineStepInputSchema) }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
10524
10630
  name: string(),
10525
10631
  steps: array(PipelineTemplateStepSchema).readonly(),
10526
10632
  engine: PipelineEngineChoiceSchema
@@ -10537,10 +10643,6 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
10537
10643
  modelId: string(),
10538
10644
  format: ModelFormatSchema$1
10539
10645
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
10540
- addonId: string(),
10541
- frame: FrameInputSchema,
10542
- config: record(string(), unknown()).optional()
10543
- }), DetectorOutputSchema), method(object({
10544
10646
  engine: PipelineEngineChoiceSchema.optional(),
10545
10647
  steps: array(PipelineStepInputSchema).min(1),
10546
10648
  frame: FrameInputSchema.optional(),
@@ -10686,6 +10788,25 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
10686
10788
  auth: "admin"
10687
10789
  }), object({ zones: array(ZoneSchema).readonly() });
10688
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
+ /**
10689
10810
  * Per-camera tunable ranges + defaults. Single source of truth used
10690
10811
  * by both the Zod data schema (validation + default fallback) and
10691
10812
  * the device settings UI (slider min/max/step). Touch one place and
@@ -10780,6 +10901,13 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
10780
10901
  kind: literal("remote-restream"),
10781
10902
  /** The camera's source-owner node (slice 1: always the hub). */
10782
10903
  ownerNodeId: string(),
10904
+ /**
10905
+ * The owner's LAN-reachable host, resolved by the orchestrator from the
10906
+ * per-node `reachableHost` override (Cluster UI). When present the runner
10907
+ * dials THIS host for the owner's restream, in preference to the
10908
+ * `CAMSTACK_HUB_URL`-derived default. Absent → auto-detect fallback.
10909
+ */
10910
+ ownerReachableHost: string().optional(),
10783
10911
  /** Operator override for the owner host the runner dials. */
10784
10912
  hubHostnameOverride: string().optional()
10785
10913
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
@@ -10788,13 +10916,11 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
10788
10916
  * specific runner instance via `attachCamera`. Carries everything the
10789
10917
  * runner needs to subscribe to the local broker and execute inference.
10790
10918
  *
10791
- * Stateless-pipeline model: the full pipeline content (`engine`, `steps`,
10792
- * optional `audio`) travels with the attach payload. The runner keeps it
10793
- * in RAM for the lifetime of the attach — on rebalance, edit, or
10794
- * restart the orchestrator re-sends the latest snapshot.
10795
- *
10796
- * `engine`/`steps`/`audio` are optional during the additive migration
10797
- * window; once orchestrator + UI are migrated they become required.
10919
+ * Stateless-pipeline model: the pipeline content (`steps`, optional
10920
+ * `audio`) travels with the attach payload. The runner keeps it in RAM
10921
+ * for the lifetime of the attach — on rebalance, edit, or restart the
10922
+ * orchestrator re-sends the latest snapshot. Engine is NOT carried: it is
10923
+ * node-local, resolved by the executing runner at dispatch time.
10798
10924
  */
10799
10925
  var RunnerCameraConfigSchema = object({
10800
10926
  deviceId: number(),
@@ -10845,14 +10971,11 @@ var RunnerCameraConfigSchema = object({
10845
10971
  */
10846
10972
  motionSources: MotionSourcesSchema.default(["analyzer"]),
10847
10973
  pipelineEnabled: boolean().default(true),
10848
- /** Engine choice for video steps (runtime+backend+format). */
10849
- engine: PipelineEngineChoiceSchema.optional(),
10850
10974
  /** Ordered tree of video steps. Absent → runner skips video detection. */
10851
10975
  steps: array(PipelineStepInputSchema).readonly().optional(),
10852
10976
  /** Audio classification branch. `enabled:false` disables, null skips. */
10853
10977
  audio: object({
10854
- engine: PipelineEngineChoiceSchema,
10855
- modelId: string(),
10978
+ modelId: string().optional(),
10856
10979
  enabled: boolean()
10857
10980
  }).nullable().optional(),
10858
10981
  /**
@@ -10939,7 +11062,11 @@ var RunnerLocalMetricsSchema = object({
10939
11062
  avgInferenceTimeMs: number(),
10940
11063
  queueDepth: number()
10941
11064
  });
10942
- 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());
10943
11070
  object({
10944
11071
  detected: boolean(),
10945
11072
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -12233,7 +12360,9 @@ var AddonPageDeclarationSchema$1 = object({
12233
12360
  icon: string(),
12234
12361
  path: string(),
12235
12362
  remoteName: string(),
12236
- bundle: string()
12363
+ bundle: string(),
12364
+ section: string().optional(),
12365
+ sectionLabel: string().optional()
12237
12366
  });
12238
12367
  var AddonPageInfoSchema = object({
12239
12368
  addonId: string(),
@@ -12273,7 +12402,18 @@ var AddonPageDeclarationSchema = object({
12273
12402
  * the static-file route can compute an mtime-based cache-buster URL
12274
12403
  * without a separate filesystem stat.
12275
12404
  */
12276
- bundle: string()
12405
+ bundle: string(),
12406
+ /**
12407
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
12408
+ * `'cluster'`, `'administration'` — the page renders inside that group.
12409
+ * Any OTHER string creates (or joins) a custom section rendered after
12410
+ * the built-in groups; its label comes from `sectionLabel` (first
12411
+ * declaration wins), falling back to the id. Absent → the legacy
12412
+ * "Addon Pages" group.
12413
+ */
12414
+ section: string().optional(),
12415
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
12416
+ sectionLabel: string().optional()
12277
12417
  });
12278
12418
  method(_void(), array(AddonPageDeclarationSchema).readonly());
12279
12419
  var AddonHttpRouteSchema = object({
@@ -12489,6 +12629,17 @@ var WidgetMetadataSchema = object({
12489
12629
  deviceContext: boolean().default(false),
12490
12630
  integrationContext: boolean().default(false)
12491
12631
  }),
12632
+ /**
12633
+ * Loadable BEFORE authentication. The normal widget registry listing
12634
+ * (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
12635
+ * (the login page) cannot discover a widget through it. A widget that
12636
+ * declares `preAuth: true` marks itself as safe to mount on a pre-auth
12637
+ * screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
12638
+ * login-method contribution channel (see `login-method.cap.ts`) rather
12639
+ * than the authenticated registry, and its bundle is served by the
12640
+ * public `/api/addon-widgets/:addonId/*` static route. Defaults false.
12641
+ */
12642
+ preAuth: boolean().optional().default(false),
12492
12643
  /** Dashboard placement HINTS (operator can override per instance). */
12493
12644
  defaultSize: WidgetSizeEnum.default("md"),
12494
12645
  allowedSizes: array(WidgetSizeEnum).readonly().default([
@@ -12790,6 +12941,66 @@ method(object({
12790
12941
  password: string()
12791
12942
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12792
12943
  /**
12944
+ * `login-method` — collection cap through which auth addons contribute
12945
+ * their pre-auth login surfaces to the login page. This is the SINGLE,
12946
+ * generic mechanism that supersedes the dead `auth.listProviders` reader:
12947
+ * every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
12948
+ * `login-method` provider and the PUBLIC `auth.listLoginMethods`
12949
+ * procedure aggregates them for the unauthenticated login page.
12950
+ *
12951
+ * A contribution is a discriminated union on `kind`:
12952
+ *
12953
+ * - `redirect` — a declarative button. The login page renders a generic
12954
+ * button that navigates to `startUrl` (an addon-owned HTTP route).
12955
+ * Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
12956
+ * ZERO shell-side JS. A future SSO addon plugs in the same way — the
12957
+ * login page needs NO change.
12958
+ *
12959
+ * - `widget` — a Module-Federation widget the login page mounts (via
12960
+ * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
12961
+ * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
12962
+ * addon bundle. The referenced widget also declares `preAuth: true` in
12963
+ * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
12964
+ * stamps a public `bundleUrl` from `addonId` + `bundle`.
12965
+ *
12966
+ * Every contribution carries a `stage`:
12967
+ * - `primary` — shown on the first credentials screen (OIDC /
12968
+ * magic-link buttons; a future usernameless passkey).
12969
+ * - `second-factor` — shown AFTER the password leg, gated on the
12970
+ * returned `factors` (passkey-as-2FA today).
12971
+ *
12972
+ * `mount: skip` — the cap is read server-side by the core auth router
12973
+ * (`registry.getCollection('login-method')`), never mounted as its own
12974
+ * tRPC router.
12975
+ */
12976
+ /** When a login method renders in the two-phase login flow. */
12977
+ var LoginStageEnum = _enum(["primary", "second-factor"]);
12978
+ /** One login-method contribution — redirect button OR pre-auth widget. */
12979
+ var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
12980
+ kind: literal("redirect"),
12981
+ /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
12982
+ id: string(),
12983
+ /** Operator-facing button label. */
12984
+ label: string(),
12985
+ /** lucide-react icon name. */
12986
+ icon: string().optional(),
12987
+ /** Addon-owned HTTP route the button navigates to (GET). */
12988
+ startUrl: string(),
12989
+ stage: LoginStageEnum
12990
+ }), object({
12991
+ kind: literal("widget"),
12992
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
12993
+ id: string(),
12994
+ /** Owning addon id — drives the public bundle URL + the MF namespace. */
12995
+ addonId: string(),
12996
+ /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
12997
+ bundle: string(),
12998
+ /** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
12999
+ remote: WidgetRemoteSchema,
13000
+ stage: LoginStageEnum
13001
+ })]);
13002
+ method(_void(), array(LoginMethodContributionSchema).readonly());
13003
+ /**
12793
13004
  * Orchestrator-side destination metadata. The orchestrator computes
12794
13005
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12795
13006
  * (admin UI, restore flow) see one canonical key.
@@ -14931,7 +15142,17 @@ var TrackSchema = object({
14931
15142
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
14932
15143
  totalDistance: number(),
14933
15144
  state: TrackStateSchema,
14934
- 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()
14935
15156
  });
14936
15157
  var BaseEventFields = {
14937
15158
  id: string(),
@@ -14996,8 +15217,18 @@ var ObjectEventSchema = object({
14996
15217
  frameHeight: number().optional(),
14997
15218
  /** MediaStore key for the crop attached to this event (if any). */
14998
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(),
14999
15226
  /** Populated by B5 (recording playback URL for this event). */
15000
- 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()
15001
15232
  });
15002
15233
  var AudioEventSchema = object({
15003
15234
  ...BaseEventFields,
@@ -15021,7 +15252,8 @@ var MediaFileKindEnum = _enum([
15021
15252
  "fullFrame",
15022
15253
  "fullFrameBoxed",
15023
15254
  "faceCrop",
15024
- "plateCrop"
15255
+ "plateCrop",
15256
+ "keyFrame"
15025
15257
  ]);
15026
15258
  var MediaFileSchema = object({
15027
15259
  key: string(),
@@ -15042,6 +15274,32 @@ var DeviceEventQueryInput = object({
15042
15274
  projection: _enum(["full", "slim"]).optional()
15043
15275
  });
15044
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
+ });
15045
15303
  var TrackedDetectionSchema = object({
15046
15304
  trackId: string(),
15047
15305
  className: string(),
@@ -15071,7 +15329,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15071
15329
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
15072
15330
  kind: "mutation",
15073
15331
  auth: "admin"
15074
- }), 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({
15075
15333
  deviceId: number(),
15076
15334
  since: number(),
15077
15335
  until: number(),
@@ -15116,11 +15374,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
15116
15374
  timestamp: number()
15117
15375
  });
15118
15376
  var CameraPipelineConfigSchema = object({
15119
- engine: PipelineEngineChoiceSchema,
15377
+ engine: PipelineEngineChoiceSchema.optional(),
15120
15378
  steps: array(PipelineStepInputSchema).readonly(),
15121
15379
  audio: object({
15122
- engine: PipelineEngineChoiceSchema,
15123
- modelId: string(),
15380
+ engine: PipelineEngineChoiceSchema.optional(),
15381
+ modelId: string().optional(),
15124
15382
  enabled: boolean(),
15125
15383
  settings: record(string(), unknown()).readonly().optional()
15126
15384
  }).nullable().optional()
@@ -15135,7 +15393,7 @@ var PipelineTemplateSchema = object({
15135
15393
  });
15136
15394
  var AgentAddonConfigSchema = object({
15137
15395
  enabled: boolean(),
15138
- modelId: string(),
15396
+ modelId: string().optional(),
15139
15397
  settings: record(string(), unknown()).readonly()
15140
15398
  });
15141
15399
  var AgentPipelineSettingsSchema = object({
@@ -15145,12 +15403,25 @@ var AgentPipelineSettingsSchema = object({
15145
15403
  detectWeight: number().positive().optional(),
15146
15404
  /** Node is eligible to run the detection pipeline (decode + inference). */
15147
15405
  detect: boolean().optional(),
15148
- /** Node is eligible to host decoder sessions. */
15406
+ /**
15407
+ * DEPRECATED AND IGNORED. Decode is always co-located with its frame
15408
+ * consumer, so decode eligibility IS detect eligibility. Kept optional in
15409
+ * the schema ONLY so persisted stores written before the removal still
15410
+ * parse — no code reads it and no write path emits it.
15411
+ */
15149
15412
  decode: boolean().optional(),
15150
15413
  /** Node is eligible to run audio-analyzer sessions. */
15151
15414
  audio: boolean().optional(),
15152
15415
  /** Node is eligible to be the ingest / source-owner (serve the restream). */
15153
- ingest: boolean().optional()
15416
+ ingest: boolean().optional(),
15417
+ /**
15418
+ * Operator override for the LAN host a cross-node decoder dials to reach
15419
+ * THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
15420
+ * falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
15421
+ * it already uses to reach the hub). Set this only when the auto-detected
15422
+ * address is wrong (multi-homed host, NAT, custom interface).
15423
+ */
15424
+ reachableHost: string().optional()
15154
15425
  });
15155
15426
  var CameraPipelineForAgentSchema = object({
15156
15427
  steps: array(PipelineStepInputSchema).readonly(),
@@ -15198,25 +15469,6 @@ var PipelineAssignmentSchema = object({
15198
15469
  assignedAt: number()
15199
15470
  });
15200
15471
  /**
15201
- * Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
15202
- * the decoder-node placement domain (`balanceDecoder` decision: manual pin
15203
- * → co-located with pipeline → capacity).
15204
- */
15205
- var DecoderAssignmentSchema = object({
15206
- deviceId: number(),
15207
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
15208
- decoderNodeId: string(),
15209
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
15210
- pinned: boolean(),
15211
- /** Why this assignment was made — useful for debugging the decoder balancer. */
15212
- reason: _enum([
15213
- "manual",
15214
- "co-located",
15215
- "capacity",
15216
- "hardware-affinity"
15217
- ])
15218
- });
15219
- /**
15220
15472
  * Per-agent load summary surfaced to the load balancer + dashboards.
15221
15473
  * Aggregated from each runner's `getLocalLoad` cap call.
15222
15474
  */
@@ -15256,6 +15508,15 @@ var GlobalMetricsSchema = object({
15256
15508
  * capability providers.
15257
15509
  */
15258
15510
  var CapabilityBindingsSchema = record(string(), string());
15511
+ /**
15512
+ * The cluster's single camera-source owner (`clusterRoles.ingestNode`) plus
15513
+ * its LAN-reachable host, if one is registered. See `getIngestOwner`.
15514
+ */
15515
+ var IngestOwnerSchema = object({
15516
+ ownerNodeId: string(),
15517
+ reachableHost: string().optional(),
15518
+ configIssue: string().optional()
15519
+ });
15259
15520
  /** Source block — always present; derives from the stream catalog. */
15260
15521
  var CameraSourceStatusSchema = object({ streams: array(object({
15261
15522
  camStreamId: string(),
@@ -15270,6 +15531,14 @@ var CameraAssignmentStatusSchema = object({
15270
15531
  detectionNodeId: string().nullable(),
15271
15532
  decoderNodeId: string().nullable(),
15272
15533
  audioNodeId: string().nullable(),
15534
+ /**
15535
+ * The node that OWNS this camera's physical source pull (dials the RTSP and
15536
+ * hosts the broker/restream) — the cluster ingest owner today
15537
+ * (`clusterRoles.ingestNode`), per-camera once source assignment lands. Lets
15538
+ * the UI show WHERE a camera is sourced without SSH/logs, and is the node the
15539
+ * broker block below was read from (pinned). Nullable only pre-wiring.
15540
+ */
15541
+ sourceNodeId: string().nullable(),
15273
15542
  pinned: object({
15274
15543
  detection: boolean(),
15275
15544
  decoder: boolean(),
@@ -15402,16 +15671,7 @@ method(object({
15402
15671
  }), object({ success: literal(true) }), {
15403
15672
  kind: "mutation",
15404
15673
  auth: "admin"
15405
- }), method(object({
15406
- deviceId: number(),
15407
- nodeId: string()
15408
- }), _void(), {
15409
- kind: "mutation",
15410
- auth: "admin"
15411
- }), method(object({ deviceId: number() }), _void(), {
15412
- kind: "mutation",
15413
- auth: "admin"
15414
- }), method(_void(), array(DecoderAssignmentSchema).readonly()), method(object({
15674
+ }), method(_void(), IngestOwnerSchema), method(object({
15415
15675
  deviceId: number(),
15416
15676
  nodeId: string()
15417
15677
  }), object({ success: literal(true) }), {
@@ -15432,10 +15692,7 @@ method(object({
15432
15692
  nodeId: string(),
15433
15693
  pinned: boolean(),
15434
15694
  assignedAt: number()
15435
- }))), method(object({
15436
- deviceId: number(),
15437
- pipelineNodeId: string().optional()
15438
- }), DecoderAssignmentSchema), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
15695
+ }))), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
15439
15696
  nodeId: string(),
15440
15697
  settings: AgentPipelineSettingsSchema
15441
15698
  })).readonly()), method(object({
@@ -15465,12 +15722,26 @@ method(object({
15465
15722
  }), method(object({
15466
15723
  agentNodeId: string(),
15467
15724
  detect: boolean().nullable().optional(),
15468
- decode: boolean().nullable().optional(),
15469
15725
  audio: boolean().nullable().optional(),
15470
15726
  ingest: boolean().nullable().optional()
15471
15727
  }), object({ success: literal(true) }), {
15472
15728
  kind: "mutation",
15473
15729
  auth: "admin"
15730
+ }), method(object({
15731
+ agentNodeId: string(),
15732
+ reachableHost: string().nullable()
15733
+ }), object({ success: literal(true) }), {
15734
+ kind: "mutation",
15735
+ auth: "admin"
15736
+ }), method(object({ agentNodeId: string() }), object({
15737
+ success: literal(true),
15738
+ /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
15739
+ effectiveModelId: string().nullable(),
15740
+ /** Number of cameras whose node-scoped overrides were cleared. */
15741
+ clearedCameraOverrides: number()
15742
+ }), {
15743
+ kind: "mutation",
15744
+ auth: "admin"
15474
15745
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
15475
15746
  deviceId: number(),
15476
15747
  addonId: string(),
@@ -15515,22 +15786,131 @@ method(object({
15515
15786
  kind: "mutation",
15516
15787
  auth: "admin"
15517
15788
  });
15518
- var RegisteredStreamSchema = object({
15519
- streamId: string(),
15520
- label: string().optional(),
15521
- codec: string(),
15522
- type: _enum(["video", "audio"]),
15523
- sourceUrl: string()
15789
+ /**
15790
+ * server-management — per-NODE singleton capability for a node's ROOT
15791
+ * package lifecycle (runtime-updatable node packages, phase 2: hub + docker
15792
+ * agents).
15793
+ *
15794
+ * Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
15795
+ * on agents) carries the whole software stack in its npm dep tree, so ONE
15796
+ * version describes the node. Updates install into
15797
+ * `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
15798
+ * starter (probation boot + auto-rollback to N-1).
15799
+ *
15800
+ * Providers:
15801
+ * - HUB: `ServerUpdateService` behind the `server-provided` mount
15802
+ * (`buildServerProviders` in trpc.router.ts) — the default target for
15803
+ * unpinned calls.
15804
+ * - AGENT: `AgentUpdateService` registered by the agent bootstrap under
15805
+ * the synthetic `agent-runtime` addonId and declared in the agent's
15806
+ * `$hub.registerNode` manifest.
15807
+ *
15808
+ * Node routing: singleton caps get the codegen/runtime-builder `nodeId`
15809
+ * injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
15810
+ * SDK) routes the call to that node's provider via the standard remote
15811
+ * proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
15812
+ * in-process provider lookup). No `nodeId` → the hub's own provider.
15813
+ *
15814
+ * Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
15815
+ */
15816
+ /**
15817
+ * Where the running hub's code was loaded from:
15818
+ * - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
15819
+ * plain resolution and runtime updates are refused.
15820
+ * - `baked` — the immutable image seed closure (no data-dir root active).
15821
+ * - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
15822
+ */
15823
+ var ServerBootModeSchema = _enum([
15824
+ "workspace",
15825
+ "baked",
15826
+ "data-root"
15827
+ ]);
15828
+ /**
15829
+ * Update lifecycle state:
15830
+ * - `idle` / `checking` / `staging` — steady / in-flight registry work.
15831
+ * - `pending-restart` — a version is staged and the node has NOT yet
15832
+ * restarted onto it (still running the OLD version).
15833
+ * - `awaiting-confirmation` — the node HAS restarted onto the staged version
15834
+ * (it is the active probation boot) and is waiting to confirm boot-health.
15835
+ * Apply/rollback are refused in this state and the node must NOT be
15836
+ * manually restarted, or the probation boot auto-rolls-back.
15837
+ */
15838
+ var ServerUpdateStateSchema = _enum([
15839
+ "idle",
15840
+ "checking",
15841
+ "staging",
15842
+ "pending-restart",
15843
+ "awaiting-confirmation"
15844
+ ]);
15845
+ var ServerRollbackInfoSchema = object({
15846
+ /** The version that failed (or was manually rolled back). */
15847
+ fromVersion: string(),
15848
+ /** The version rolled back to; null = the baked seed. */
15849
+ toVersion: string().nullable(),
15850
+ atMs: number(),
15851
+ reason: string()
15524
15852
  });
15525
- var ExposedResourceSchema = object({
15526
- streamId: string(),
15527
- format: string(),
15528
- value: string()
15853
+ var ServerPackageStatusSchema = object({
15854
+ /** Root package name (`@camstack/server` on the hub). */
15855
+ packageName: string(),
15856
+ /** Version of the code the running process ACTUALLY loaded. */
15857
+ runningVersion: string().nullable(),
15858
+ /** Node.js runtime version the node's process runs on (`process.versions.node`). */
15859
+ nodeRuntimeVersion: string().nullable(),
15860
+ /** Active data-dir root version; null when booted from seed/workspace. */
15861
+ activeVersion: string().nullable(),
15862
+ /** N-1 version kept for rollback; null when no previous version exists. */
15863
+ previousVersion: string().nullable(),
15864
+ /** Version of the immutable baked seed closure (image fallback). */
15865
+ seedVersion: string().nullable(),
15866
+ /** Latest registry version from the most recent check (null = never checked). */
15867
+ latestVersion: string().nullable(),
15868
+ updateAvailable: boolean(),
15869
+ bootMode: ServerBootModeSchema,
15870
+ updateState: ServerUpdateStateSchema,
15871
+ /** Version staged + awaiting its probation boot, when one is pending. */
15872
+ pendingVersion: string().nullable(),
15873
+ /** Set when the last freshly-activated version failed its boot health-check. */
15874
+ rolledBack: ServerRollbackInfoSchema.nullable(),
15875
+ /**
15876
+ * True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
15877
+ * hub is running from the baked seed (or workspace) while installed data-dir
15878
+ * versions are being IGNORED. Surfaced as a warning in the UI.
15879
+ */
15880
+ stateFileCorrupt: boolean(),
15881
+ lastCheckedAtMs: number().nullable()
15882
+ });
15883
+ var ServerUpdateCheckResultSchema = object({
15884
+ packageName: string(),
15885
+ runningVersion: string().nullable(),
15886
+ latestVersion: string().nullable(),
15887
+ updateAvailable: boolean(),
15888
+ checkedAtMs: number(),
15889
+ /** Non-null when the registry lookup failed (offline, bad registry, …). */
15890
+ error: string().nullable()
15891
+ });
15892
+ var ServerUpdateActionResultSchema = object({
15893
+ accepted: boolean(),
15894
+ targetVersion: string().nullable(),
15895
+ /** True when a graceful restart was scheduled to apply the change. */
15896
+ restarting: boolean(),
15897
+ message: string()
15898
+ });
15899
+ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
15900
+ kind: "mutation",
15901
+ auth: "admin"
15902
+ }), method(object({
15903
+ /** Explicit target version; omitted = latest from the registry. */
15904
+ version: string().optional() }), ServerUpdateActionResultSchema, {
15905
+ kind: "mutation",
15906
+ auth: "admin"
15907
+ }), method(_void(), ServerUpdateActionResultSchema, {
15908
+ kind: "mutation",
15909
+ auth: "admin"
15910
+ }), method(_void(), ServerUpdateActionResultSchema, {
15911
+ kind: "mutation",
15912
+ auth: "admin"
15529
15913
  });
15530
- method(object({
15531
- deviceId: number(),
15532
- streams: array(RegisteredStreamSchema).readonly()
15533
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(ExposedResourceSchema).readonly());
15534
15914
  /**
15535
15915
  * Query filter for settings-store collections.
15536
15916
  */
@@ -15683,9 +16063,9 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
15683
16063
  /**
15684
16064
  * A single device snapshot returned as base64 JPEG/PNG.
15685
16065
  *
15686
- * Shared with the `snapshot-provider` collection cap the orchestrator
15687
- * receives the same shape from each native provider and from the
15688
- * broker-based fallback.
16066
+ * The `SnapshotAddon` wrapper returns this shape whether the frame came from
16067
+ * the device-native provider (onboard capture) or from the stream-broker
16068
+ * prebuffer fallback.
15689
16069
  */
15690
16070
  var SnapshotImageSchema = object({
15691
16071
  base64: string(),
@@ -15716,11 +16096,12 @@ DeviceType.Camera, method(object({
15716
16096
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
15717
16097
  kind: "mutation",
15718
16098
  auth: "admin"
15719
- });
15720
- method(object({ deviceId: number() }), boolean()), method(object({
16099
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
15721
16100
  deviceId: number(),
15722
- streamId: string().optional()
15723
- }), SnapshotImageSchema.nullable());
16101
+ lastCapturedAt: number().nullable(),
16102
+ cacheAgeMs: number().nullable(),
16103
+ etag: string().nullable()
16104
+ })));
15724
16105
  /**
15725
16106
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
15726
16107
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -15994,10 +16375,32 @@ getTurnServers: method(_void(), array(TurnServerSchema).readonly()) }
15994
16375
  * b. `finishAuthentication({userId, response})` → server verifies
15995
16376
  * the assertion, bumps the credential counter, returns ok.
15996
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
+ *
15997
16391
  * 3. Management:
15998
16392
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
15999
16393
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16000
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
+ *
16001
16404
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16002
16405
  * the admin-ui composes the begin/finish round-trip and never exposes
16003
16406
  * the cap to non-admins.
@@ -16040,6 +16443,17 @@ method(object({
16040
16443
  }), object({ verified: boolean() }), {
16041
16444
  kind: "mutation",
16042
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"
16043
16457
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16044
16458
  userId: string(),
16045
16459
  credentialId: string()
@@ -16047,6 +16461,13 @@ method(object({
16047
16461
  kind: "mutation",
16048
16462
  auth: "admin",
16049
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"
16050
16471
  });
16051
16472
  /**
16052
16473
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -16104,9 +16525,10 @@ method(object({
16104
16525
  auth: "admin"
16105
16526
  });
16106
16527
  /**
16107
- * Optional client-side hints sent at session creation to help the
16108
- * provider pick the best native source. All fields are optional —
16109
- * a viewer that knows nothing still gets a sane default.
16528
+ * Optional client-side hints sent at session creation to help the provider
16529
+ * pick the best native source. All fields optional — a viewer that knows
16530
+ * nothing still gets a sane default. (Relocated from the retired `webrtc`
16531
+ * collection cap; this `webrtc-session` cap is the live signaling surface.)
16110
16532
  */
16111
16533
  var webrtcClientHintsSchema = object({
16112
16534
  viewportWidth: number().int().positive().optional(),
@@ -16117,22 +16539,6 @@ var webrtcClientHintsSchema = object({
16117
16539
  /** Hard tier override; takes precedence over scoring when registered. */
16118
16540
  prefersTier: string().optional()
16119
16541
  }).partial();
16120
- method(object({
16121
- streamId: string(),
16122
- sdpOffer: string()
16123
- }), string(), { kind: "mutation" }), method(object({ streamId: string() }), boolean()), method(object({
16124
- streamId: string(),
16125
- codec: string()
16126
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
16127
- streamId: string(),
16128
- hints: webrtcClientHintsSchema.optional()
16129
- }), object({
16130
- sessionId: string(),
16131
- sdpOffer: string()
16132
- }), { kind: "mutation" }), method(object({
16133
- sessionId: string(),
16134
- sdpAnswer: string()
16135
- }), _void(), { kind: "mutation" }), method(object({ sessionId: string() }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), boolean());
16136
16542
  /**
16137
16543
  * Discriminated target for a WebRTC session. The client sends this
16138
16544
  * structured object instead of building / parsing brokerId strings;
@@ -16863,7 +17269,17 @@ var FaceInfoSchema = object({
16863
17269
  recognizedIdentityId: string().optional(),
16864
17270
  identityName: string().optional(),
16865
17271
  assigned: boolean(),
16866
- 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()
16867
17283
  });
16868
17284
  var FaceFilterEnum = _enum([
16869
17285
  "unassigned",
@@ -17560,6 +17976,16 @@ var TopologyCategorySchema = object({
17560
17976
  healthy: number(),
17561
17977
  addons: array(TopologyCategoryAddonSchema).readonly()
17562
17978
  });
17979
+ /**
17980
+ * The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
17981
+ * `@camstack/agent` on agents) as reported by its `registerNode` manifest —
17982
+ * version visibility for the Server management surface. Nullable: offline
17983
+ * rows and pre-phase-2 nodes report none.
17984
+ */
17985
+ var TopologyRootPackageSchema = object({
17986
+ name: string(),
17987
+ version: string()
17988
+ });
17563
17989
  var TopologyNodeSchema = object({
17564
17990
  id: string(),
17565
17991
  name: string(),
@@ -17583,7 +18009,8 @@ var TopologyNodeSchema = object({
17583
18009
  status: string()
17584
18010
  })).readonly(),
17585
18011
  processes: array(TopologyProcessSchema).readonly(),
17586
- categories: array(TopologyCategorySchema).readonly()
18012
+ categories: array(TopologyCategorySchema).readonly(),
18013
+ rootPackage: TopologyRootPackageSchema.nullable()
17587
18014
  });
17588
18015
  var CapUsageEdgeSchema = object({
17589
18016
  callerAddonId: string(),
@@ -20383,6 +20810,12 @@ Object.freeze({
20383
20810
  addonId: null,
20384
20811
  access: "create"
20385
20812
  },
20813
+ "loginMethod.getLoginMethods": {
20814
+ capName: "login-method",
20815
+ capScope: "system",
20816
+ addonId: null,
20817
+ access: "view"
20818
+ },
20386
20819
  "mediaPlayer.next": {
20387
20820
  capName: "media-player",
20388
20821
  capScope: "device",
@@ -20965,6 +21398,12 @@ Object.freeze({
20965
21398
  addonId: null,
20966
21399
  access: "view"
20967
21400
  },
21401
+ "pipelineAnalytics.getKeyEvents": {
21402
+ capName: "pipeline-analytics",
21403
+ capScope: "device",
21404
+ addonId: null,
21405
+ access: "view"
21406
+ },
20968
21407
  "pipelineAnalytics.getMotionEvents": {
20969
21408
  capName: "pipeline-analytics",
20970
21409
  capScope: "device",
@@ -21013,23 +21452,23 @@ Object.freeze({
21013
21452
  addonId: null,
21014
21453
  access: "create"
21015
21454
  },
21016
- "pipelineExecutor.deleteModel": {
21455
+ "pipelineExecutor.clearDeviceOverrides": {
21017
21456
  capName: "pipeline-executor",
21018
21457
  capScope: "system",
21019
21458
  addonId: null,
21020
21459
  access: "delete"
21021
21460
  },
21022
- "pipelineExecutor.deleteTemplate": {
21461
+ "pipelineExecutor.deleteModel": {
21023
21462
  capName: "pipeline-executor",
21024
21463
  capScope: "system",
21025
21464
  addonId: null,
21026
21465
  access: "delete"
21027
21466
  },
21028
- "pipelineExecutor.detect": {
21467
+ "pipelineExecutor.deleteTemplate": {
21029
21468
  capName: "pipeline-executor",
21030
21469
  capScope: "system",
21031
21470
  addonId: null,
21032
- access: "view"
21471
+ access: "delete"
21033
21472
  },
21034
21473
  "pipelineExecutor.downloadModel": {
21035
21474
  capName: "pipeline-executor",
@@ -21223,13 +21662,13 @@ Object.freeze({
21223
21662
  addonId: null,
21224
21663
  access: "create"
21225
21664
  },
21226
- "pipelineOrchestrator.assignAudio": {
21227
- capName: "pipeline-orchestrator",
21665
+ "pipelineExecutor.validatePipeline": {
21666
+ capName: "pipeline-executor",
21228
21667
  capScope: "system",
21229
21668
  addonId: null,
21230
- access: "create"
21669
+ access: "view"
21231
21670
  },
21232
- "pipelineOrchestrator.assignDecoder": {
21671
+ "pipelineOrchestrator.assignAudio": {
21233
21672
  capName: "pipeline-orchestrator",
21234
21673
  capScope: "system",
21235
21674
  addonId: null,
@@ -21313,19 +21752,13 @@ Object.freeze({
21313
21752
  addonId: null,
21314
21753
  access: "view"
21315
21754
  },
21316
- "pipelineOrchestrator.getDecoderAssignment": {
21317
- capName: "pipeline-orchestrator",
21318
- capScope: "system",
21319
- addonId: null,
21320
- access: "view"
21321
- },
21322
- "pipelineOrchestrator.getDecoderAssignments": {
21755
+ "pipelineOrchestrator.getGlobalMetrics": {
21323
21756
  capName: "pipeline-orchestrator",
21324
21757
  capScope: "system",
21325
21758
  addonId: null,
21326
21759
  access: "view"
21327
21760
  },
21328
- "pipelineOrchestrator.getGlobalMetrics": {
21761
+ "pipelineOrchestrator.getIngestOwner": {
21329
21762
  capName: "pipeline-orchestrator",
21330
21763
  capScope: "system",
21331
21764
  addonId: null,
@@ -21367,6 +21800,12 @@ Object.freeze({
21367
21800
  addonId: null,
21368
21801
  access: "delete"
21369
21802
  },
21803
+ "pipelineOrchestrator.resetNodePipelineDefaults": {
21804
+ capName: "pipeline-orchestrator",
21805
+ capScope: "system",
21806
+ addonId: null,
21807
+ access: "delete"
21808
+ },
21370
21809
  "pipelineOrchestrator.resolvePipeline": {
21371
21810
  capName: "pipeline-orchestrator",
21372
21811
  capScope: "system",
@@ -21403,37 +21842,37 @@ Object.freeze({
21403
21842
  addonId: null,
21404
21843
  access: "create"
21405
21844
  },
21406
- "pipelineOrchestrator.setCameraPipelineForAgent": {
21845
+ "pipelineOrchestrator.setAgentReachableHost": {
21407
21846
  capName: "pipeline-orchestrator",
21408
21847
  capScope: "system",
21409
21848
  addonId: null,
21410
21849
  access: "create"
21411
21850
  },
21412
- "pipelineOrchestrator.setCameraStepOverride": {
21851
+ "pipelineOrchestrator.setCameraPipelineForAgent": {
21413
21852
  capName: "pipeline-orchestrator",
21414
21853
  capScope: "system",
21415
21854
  addonId: null,
21416
21855
  access: "create"
21417
21856
  },
21418
- "pipelineOrchestrator.setCameraStepToggle": {
21857
+ "pipelineOrchestrator.setCameraStepOverride": {
21419
21858
  capName: "pipeline-orchestrator",
21420
21859
  capScope: "system",
21421
21860
  addonId: null,
21422
21861
  access: "create"
21423
21862
  },
21424
- "pipelineOrchestrator.setCapabilityBinding": {
21863
+ "pipelineOrchestrator.setCameraStepToggle": {
21425
21864
  capName: "pipeline-orchestrator",
21426
21865
  capScope: "system",
21427
21866
  addonId: null,
21428
21867
  access: "create"
21429
21868
  },
21430
- "pipelineOrchestrator.unassignAudio": {
21869
+ "pipelineOrchestrator.setCapabilityBinding": {
21431
21870
  capName: "pipeline-orchestrator",
21432
21871
  capScope: "system",
21433
21872
  addonId: null,
21434
21873
  access: "create"
21435
21874
  },
21436
- "pipelineOrchestrator.unassignDecoder": {
21875
+ "pipelineOrchestrator.unassignAudio": {
21437
21876
  capName: "pipeline-orchestrator",
21438
21877
  capScope: "system",
21439
21878
  addonId: null,
@@ -21493,6 +21932,12 @@ Object.freeze({
21493
21932
  addonId: null,
21494
21933
  access: "view"
21495
21934
  },
21935
+ "pipelineRunner.getNativeCrop": {
21936
+ capName: "pipeline-runner",
21937
+ capScope: "system",
21938
+ addonId: null,
21939
+ access: "view"
21940
+ },
21496
21941
  "pipelineRunner.reportMotion": {
21497
21942
  capName: "pipeline-runner",
21498
21943
  capScope: "system",
@@ -21733,33 +22178,45 @@ Object.freeze({
21733
22178
  addonId: null,
21734
22179
  access: "create"
21735
22180
  },
21736
- "restreamer.getExposedResources": {
21737
- capName: "restreamer",
22181
+ "scriptRunner.run": {
22182
+ capName: "script-runner",
22183
+ capScope: "device",
22184
+ addonId: null,
22185
+ access: "create"
22186
+ },
22187
+ "scriptRunner.stop": {
22188
+ capName: "script-runner",
22189
+ capScope: "device",
22190
+ addonId: null,
22191
+ access: "create"
22192
+ },
22193
+ "serverManagement.applyServerUpdate": {
22194
+ capName: "server-management",
21738
22195
  capScope: "system",
21739
22196
  addonId: null,
21740
- access: "view"
22197
+ access: "create"
21741
22198
  },
21742
- "restreamer.registerDevice": {
21743
- capName: "restreamer",
22199
+ "serverManagement.checkServerUpdate": {
22200
+ capName: "server-management",
21744
22201
  capScope: "system",
21745
22202
  addonId: null,
21746
22203
  access: "create"
21747
22204
  },
21748
- "restreamer.unregisterDevice": {
21749
- capName: "restreamer",
22205
+ "serverManagement.getServerPackageStatus": {
22206
+ capName: "server-management",
21750
22207
  capScope: "system",
21751
22208
  addonId: null,
21752
- access: "delete"
22209
+ access: "view"
21753
22210
  },
21754
- "scriptRunner.run": {
21755
- capName: "script-runner",
21756
- capScope: "device",
22211
+ "serverManagement.restartServer": {
22212
+ capName: "server-management",
22213
+ capScope: "system",
21757
22214
  addonId: null,
21758
22215
  access: "create"
21759
22216
  },
21760
- "scriptRunner.stop": {
21761
- capName: "script-runner",
21762
- capScope: "device",
22217
+ "serverManagement.rollbackServerUpdate": {
22218
+ capName: "server-management",
22219
+ capScope: "system",
21763
22220
  addonId: null,
21764
22221
  access: "create"
21765
22222
  },
@@ -21847,23 +22304,17 @@ Object.freeze({
21847
22304
  addonId: null,
21848
22305
  access: "view"
21849
22306
  },
21850
- "snapshot.invalidateCache": {
22307
+ "snapshot.getSnapshotOverview": {
21851
22308
  capName: "snapshot",
21852
22309
  capScope: "device",
21853
22310
  addonId: null,
21854
- access: "create"
21855
- },
21856
- "snapshotProvider.getSnapshot": {
21857
- capName: "snapshot-provider",
21858
- capScope: "system",
21859
- addonId: null,
21860
22311
  access: "view"
21861
22312
  },
21862
- "snapshotProvider.supportsDevice": {
21863
- capName: "snapshot-provider",
21864
- capScope: "system",
22313
+ "snapshot.invalidateCache": {
22314
+ capName: "snapshot",
22315
+ capScope: "device",
21865
22316
  addonId: null,
21866
- access: "view"
22317
+ access: "create"
21867
22318
  },
21868
22319
  "ssoBridge.signBridgeToken": {
21869
22320
  capName: "sso-bridge",
@@ -22291,30 +22742,6 @@ Object.freeze({
22291
22742
  addonId: null,
22292
22743
  access: "view"
22293
22744
  },
22294
- "streamingEngine.getStreamUrl": {
22295
- capName: "streaming-engine",
22296
- capScope: "system",
22297
- addonId: null,
22298
- access: "view"
22299
- },
22300
- "streamingEngine.listStreams": {
22301
- capName: "streaming-engine",
22302
- capScope: "system",
22303
- addonId: null,
22304
- access: "view"
22305
- },
22306
- "streamingEngine.registerStream": {
22307
- capName: "streaming-engine",
22308
- capScope: "system",
22309
- addonId: null,
22310
- access: "create"
22311
- },
22312
- "streamingEngine.unregisterStream": {
22313
- capName: "streaming-engine",
22314
- capScope: "system",
22315
- addonId: null,
22316
- access: "delete"
22317
- },
22318
22745
  "streamParams.getConfigSchema": {
22319
22746
  capName: "stream-params",
22320
22747
  capScope: "device",
@@ -22561,6 +22988,12 @@ Object.freeze({
22561
22988
  addonId: null,
22562
22989
  access: "view"
22563
22990
  },
22991
+ "userPasskeys.beginDiscoverableAuthentication": {
22992
+ capName: "user-passkeys",
22993
+ capScope: "system",
22994
+ addonId: null,
22995
+ access: "view"
22996
+ },
22564
22997
  "userPasskeys.beginRegistration": {
22565
22998
  capName: "user-passkeys",
22566
22999
  capScope: "system",
@@ -22573,12 +23006,24 @@ Object.freeze({
22573
23006
  addonId: null,
22574
23007
  access: "view"
22575
23008
  },
23009
+ "userPasskeys.finishDiscoverableAuthentication": {
23010
+ capName: "user-passkeys",
23011
+ capScope: "system",
23012
+ addonId: null,
23013
+ access: "view"
23014
+ },
22576
23015
  "userPasskeys.finishRegistration": {
22577
23016
  capName: "user-passkeys",
22578
23017
  capScope: "system",
22579
23018
  addonId: null,
22580
23019
  access: "create"
22581
23020
  },
23021
+ "userPasskeys.getSecondFactorPreference": {
23022
+ capName: "user-passkeys",
23023
+ capScope: "system",
23024
+ addonId: null,
23025
+ access: "view"
23026
+ },
22582
23027
  "userPasskeys.listPasskeys": {
22583
23028
  capName: "user-passkeys",
22584
23029
  capScope: "system",
@@ -22591,6 +23036,12 @@ Object.freeze({
22591
23036
  addonId: null,
22592
23037
  access: "delete"
22593
23038
  },
23039
+ "userPasskeys.setSecondFactorPreference": {
23040
+ capName: "user-passkeys",
23041
+ capScope: "system",
23042
+ addonId: null,
23043
+ access: "create"
23044
+ },
22594
23045
  "vacuumControl.locate": {
22595
23046
  capName: "vacuum-control",
22596
23047
  capScope: "device",
@@ -22663,6 +23114,18 @@ Object.freeze({
22663
23114
  addonId: null,
22664
23115
  access: "view"
22665
23116
  },
23117
+ "viewerUi.getStaticDir": {
23118
+ capName: "viewer-ui",
23119
+ capScope: "system",
23120
+ addonId: null,
23121
+ access: "view"
23122
+ },
23123
+ "viewerUi.getVersion": {
23124
+ capName: "viewer-ui",
23125
+ capScope: "system",
23126
+ addonId: null,
23127
+ access: "view"
23128
+ },
22666
23129
  "waterHeater.setAway": {
22667
23130
  capName: "water-heater",
22668
23131
  capScope: "device",
@@ -22681,54 +23144,6 @@ Object.freeze({
22681
23144
  addonId: null,
22682
23145
  access: "create"
22683
23146
  },
22684
- "webrtc.closeSession": {
22685
- capName: "webrtc",
22686
- capScope: "system",
22687
- addonId: null,
22688
- access: "create"
22689
- },
22690
- "webrtc.createSession": {
22691
- capName: "webrtc",
22692
- capScope: "system",
22693
- addonId: null,
22694
- access: "create"
22695
- },
22696
- "webrtc.handleAnswer": {
22697
- capName: "webrtc",
22698
- capScope: "system",
22699
- addonId: null,
22700
- access: "create"
22701
- },
22702
- "webrtc.handleOffer": {
22703
- capName: "webrtc",
22704
- capScope: "system",
22705
- addonId: null,
22706
- access: "create"
22707
- },
22708
- "webrtc.hasAdaptiveBitrate": {
22709
- capName: "webrtc",
22710
- capScope: "system",
22711
- addonId: null,
22712
- access: "view"
22713
- },
22714
- "webrtc.registerStream": {
22715
- capName: "webrtc",
22716
- capScope: "system",
22717
- addonId: null,
22718
- access: "create"
22719
- },
22720
- "webrtc.supportsStream": {
22721
- capName: "webrtc",
22722
- capScope: "system",
22723
- addonId: null,
22724
- access: "view"
22725
- },
22726
- "webrtc.unregisterStream": {
22727
- capName: "webrtc",
22728
- capScope: "system",
22729
- addonId: null,
22730
- access: "delete"
22731
- },
22732
23147
  "webrtcSession.addIceCandidate": {
22733
23148
  capName: "webrtc-session",
22734
23149
  capScope: "device",