@camstack/addon-provider-rademacher 0.1.6 → 0.1.8

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.
Files changed (3) hide show
  1. package/dist/addon.js +715 -288
  2. package/dist/addon.mjs +715 -288
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5626,7 +5626,7 @@ function preprocess(fn, schema) {
5626
5626
  });
5627
5627
  }
5628
5628
  //#endregion
5629
- //#region ../types/dist/sleep-CZDdRBua.mjs
5629
+ //#region ../types/dist/sleep-Baang_XW.mjs
5630
5630
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5631
5631
  EventCategory["SystemBoot"] = "system.boot";
5632
5632
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5812,6 +5812,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5812
5812
  */
5813
5813
  EventCategory["PipelineCameraUpdated"] = "pipeline.camera-updated";
5814
5814
  /**
5815
+ * The cluster camera-source OWNER changed (`clusterRoles.ingestNode`).
5816
+ * Emitted by addon-pipeline-orchestrator whenever it (re)derives node
5817
+ * capabilities — at boot, on agent online/offline, and on an ingest-node
5818
+ * flip. Carries the resolved `ownerNodeId`. The stream-broker consumes it to
5819
+ * keep its ingest-owner-gate decision current WITHOUT a per-`ensureBroker`
5820
+ * cross-process `getIngestOwner` query (push the authority's decision instead
5821
+ * of polling it on the hot path). Idempotent state — re-emitted on every
5822
+ * topology change, so a dropped event self-heals on the next one (plus the
5823
+ * broker's long backstop reconcile query).
5824
+ */
5825
+ EventCategory["PipelineIngestOwnerChanged"] = "pipeline.ingest-owner-changed";
5826
+ /**
5815
5827
  * Periodic snapshot of per-node pipeline-runner load
5816
5828
  * (`RunnerLocalLoad`). Emitted ~1Hz by every runner so UI dashboards
5817
5829
  * subscribe instead of polling `pipelineRunner.getLocalLoad`.
@@ -6335,10 +6347,6 @@ function hydrateField(field, values) {
6335
6347
  };
6336
6348
  }
6337
6349
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
6338
- if (field.type === "password") return {
6339
- ...field,
6340
- value: ""
6341
- };
6342
6350
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
6343
6351
  return {
6344
6352
  ...field,
@@ -7722,10 +7730,25 @@ function method(input, output, options) {
7722
7730
  timeoutMs: options?.timeoutMs
7723
7731
  };
7724
7732
  }
7733
+ /**
7734
+ * A wrapper/system-only method: served exclusively by the cap's system-level
7735
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
7736
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
7737
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
7738
+ */
7739
+ function systemMethod(input, output, options) {
7740
+ return {
7741
+ ...method(input, output, options),
7742
+ systemOnly: true
7743
+ };
7744
+ }
7725
7745
  /** Shorthand to define an event schema */
7726
7746
  function event(data) {
7727
7747
  return { data };
7728
7748
  }
7749
+ var StaticDirOutputSchema$1 = object({ staticDir: string() });
7750
+ var VersionOutputSchema$1 = object({ version: string() });
7751
+ method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
7729
7752
  var StaticDirOutputSchema = object({ staticDir: string() });
7730
7753
  var VersionOutputSchema = object({ version: string() });
7731
7754
  method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
@@ -7907,6 +7930,36 @@ var ModelFormatsSchema = object({
7907
7930
  tflite: ModelFormatEntrySchema.optional(),
7908
7931
  pt: ModelFormatEntrySchema.optional()
7909
7932
  });
7933
+ /**
7934
+ * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
7935
+ * the reduced `PipelineModelOption` returned in `pipeline.getSchema()` so the
7936
+ * grouped Family→Tier→Variant picker renders identically in the config UI and
7937
+ * in the pipeline/device steppers. The flat `id` stays the source of truth for
7938
+ * resolution/download/persistence; this is a presentation overlay resolved back
7939
+ * to an `id`.
7940
+ */
7941
+ var ModelVariantGroupSchema = object({
7942
+ /** Top-level family, e.g. `yolo26` (later `d-fine`, `rf-detr`). */
7943
+ family: string(),
7944
+ /** Size within the family, e.g. `n` | `s` | `m` | `l`. */
7945
+ tier: string(),
7946
+ /** Quantization axis. Omit ⇒ the fp32 base build. */
7947
+ precision: _enum(["fp32", "int8"]).optional(),
7948
+ /**
7949
+ * Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
7950
+ * latency-optimized export (e.g. ReLU-activation variant) — the slot the
7951
+ * future performance variants plug into.
7952
+ */
7953
+ optimization: _enum(["standard", "fast"]).optional(),
7954
+ /**
7955
+ * Input-resolution axis (square input side, px). Omit ⇒ the family's native
7956
+ * resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
7957
+ * cheap latency lever — especially on Apple ANE and the Intel N100 — at a
7958
+ * small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
7959
+ * the group so the selector can offer it as a variant axis.
7960
+ */
7961
+ resolution: number().int().positive().optional()
7962
+ });
7910
7963
  var ModelCatalogEntrySchema = object({
7911
7964
  id: string(),
7912
7965
  name: string(),
@@ -7936,7 +7989,43 @@ var ModelCatalogEntrySchema = object({
7936
7989
  * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
7937
7990
  * Downloaded into the same modelsDir alongside the model file.
7938
7991
  */
7939
- extraFiles: array(ModelExtraFileSchema).readonly().optional()
7992
+ extraFiles: array(ModelExtraFileSchema).readonly().optional(),
7993
+ /**
7994
+ * LEGACY entry — retained in the catalog so a persisted operator selection
7995
+ * still RESOLVES (and can be re-activated), but hidden from the selectable
7996
+ * model list and excluded from the auto format-default pick. Set on the
7997
+ * superseded / consolidated models (older lineages, redundant fp16 IRs) so
7998
+ * the active lineup stays the coherent curated ladder without deleting a
7999
+ * model anyone may still be pinned to. `resolveModelForFormat` keeps honoring
8000
+ * an explicit legacy id that has a build for the node's format.
8001
+ */
8002
+ legacy: boolean().optional(),
8003
+ /**
8004
+ * Measured quality/latency metadata — populated from the benchmark addon on
8005
+ * the real node classes. Absent = not yet measured (most entries today; the
8006
+ * catalog historically carried only `sizeMB`, a poor cross-architecture
8007
+ * speed proxy). `p95LatencyMs` is keyed by node class (e.g. `n100`, `mac`).
8008
+ */
8009
+ metrics: object({
8010
+ map50: number().optional(),
8011
+ p95LatencyMs: record(string(), number()).optional()
8012
+ }).optional(),
8013
+ /**
8014
+ * SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
8015
+ * YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
8016
+ * the retraining addon and any future commercial distribution.
8017
+ */
8018
+ license: string().optional(),
8019
+ /**
8020
+ * Variant-selector grouping. The UI groups models by `family` + `tier` and
8021
+ * offers `precision` / `optimization` as variant axes WITHIN a tier — so all
8022
+ * of a family's sizes and quantizations collapse into one grouped picker
8023
+ * instead of a flat list of `yolo26s`, `yolo26s-int8`, … Absent ⇒ ungrouped
8024
+ * (legacy / custom models) — never shown in the grouped selector. The flat
8025
+ * `id` stays the source of truth for resolution/download/persistence; grouping
8026
+ * is a presentation overlay resolved back to an `id`.
8027
+ */
8028
+ group: ModelVariantGroupSchema.optional()
7940
8029
  });
7941
8030
  var ConvertTargetSchema = discriminatedUnion("format", [object({
7942
8031
  format: literal("openvino"),
@@ -7997,8 +8086,8 @@ var RecordingModeSchema = _enum([
7997
8086
  "onAudioThreshold"
7998
8087
  ]);
7999
8088
  /**
8000
- * First-class, authoritative per-camera storage mode — the netta choice the UI
8001
- * reads directly (never inferred from `rules`):
8089
+ * First-class, authoritative per-camera storage mode — the explicit choice the
8090
+ * UI reads directly (never inferred from `rules`):
8002
8091
  * - `off` — not recording.
8003
8092
  * - `events` — record only around triggers (motion / audio threshold),
8004
8093
  * with pre/post-buffer.
@@ -10161,26 +10250,13 @@ onBrightnessChanged: { data: object({
10161
10250
  */
10162
10251
  runtimeState: BrightnessStatusSchema
10163
10252
  };
10253
+ /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
10164
10254
  var StreamFormatSchema = _enum([
10165
10255
  "webrtc",
10166
10256
  "hls",
10167
10257
  "mjpeg",
10168
10258
  "rtsp"
10169
10259
  ]);
10170
- var StreamInfoSchema = object({
10171
- streamId: string(),
10172
- format: StreamFormatSchema,
10173
- url: string().nullable(),
10174
- active: boolean()
10175
- });
10176
- method(object({
10177
- streamId: string(),
10178
- sourceUrl: string(),
10179
- codec: string().optional()
10180
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
10181
- streamId: string(),
10182
- format: StreamFormatSchema
10183
- }), string().nullable()), method(_void(), array(StreamInfoSchema));
10184
10260
  var RtspRestreamEntrySchema = object({
10185
10261
  brokerId: string(),
10186
10262
  url: string(),
@@ -11048,37 +11124,7 @@ var consumablesCapability = {
11048
11124
  scope: "device",
11049
11125
  deviceNative: true,
11050
11126
  mode: "singleton",
11051
- deviceTypes: [
11052
- DeviceType.Camera,
11053
- DeviceType.Hub,
11054
- DeviceType.Light,
11055
- DeviceType.Siren,
11056
- DeviceType.Switch,
11057
- DeviceType.Sensor,
11058
- DeviceType.Thermostat,
11059
- DeviceType.Button,
11060
- DeviceType.EventEmitter,
11061
- DeviceType.Update,
11062
- DeviceType.Generic,
11063
- DeviceType.Notifier,
11064
- DeviceType.Script,
11065
- DeviceType.Automation,
11066
- DeviceType.Lock,
11067
- DeviceType.Cover,
11068
- DeviceType.Valve,
11069
- DeviceType.Humidifier,
11070
- DeviceType.WaterHeater,
11071
- DeviceType.Fan,
11072
- DeviceType.MediaPlayer,
11073
- DeviceType.AlarmPanel,
11074
- DeviceType.Control,
11075
- DeviceType.Presence,
11076
- DeviceType.Weather,
11077
- DeviceType.Vacuum,
11078
- DeviceType.LawnMower,
11079
- DeviceType.Container,
11080
- DeviceType.Image
11081
- ],
11127
+ deviceTypes: Object.values(DeviceType),
11082
11128
  deviceConfig: { ui: {
11083
11129
  kind: "widget",
11084
11130
  widgetId: "host/consumables-panel",
@@ -12536,7 +12582,7 @@ var BoundingBoxSchema = object({
12536
12582
  w: number(),
12537
12583
  h: number()
12538
12584
  });
12539
- var SpatialDetectionSchema = object({
12585
+ object({
12540
12586
  class: string(),
12541
12587
  originalClass: string(),
12542
12588
  score: number(),
@@ -12671,7 +12717,6 @@ var PipelineDefaultStepSchema = lazy(() => object({
12671
12717
  enabled: boolean(),
12672
12718
  modelId: string(),
12673
12719
  children: array(PipelineDefaultStepSchema).readonly(),
12674
- engine: PipelineEngineChoiceSchema.optional(),
12675
12720
  group: string().optional(),
12676
12721
  settings: record(string(), unknown()).optional()
12677
12722
  }));
@@ -12696,7 +12741,9 @@ var PipelineModelOptionSchema = object({
12696
12741
  formats: record(string(), object({
12697
12742
  downloaded: boolean(),
12698
12743
  sizeMB: number()
12699
- }))
12744
+ })),
12745
+ group: ModelVariantGroupSchema.optional(),
12746
+ legacy: boolean().optional()
12700
12747
  });
12701
12748
  var ConfigFieldBridge = custom();
12702
12749
  var PipelineAddonSchemaSchema = object({
@@ -12710,6 +12757,7 @@ var PipelineAddonSchemaSchema = object({
12710
12757
  defaultModelId: string(),
12711
12758
  defaultModelIdByFormat: record(string(), string()).optional(),
12712
12759
  enabledByDefault: boolean().optional(),
12760
+ backfillIntoExistingOverrides: boolean().optional(),
12713
12761
  defaultConfidence: number(),
12714
12762
  group: string().optional(),
12715
12763
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -12726,11 +12774,6 @@ var PipelineSchemaSchema = object({
12726
12774
  selectedEngine: PipelineEngineChoiceSchema,
12727
12775
  slots: array(PipelineSlotSchemaSchema).readonly()
12728
12776
  });
12729
- var DetectorOutputSchema = object({
12730
- detections: array(SpatialDetectionSchema).readonly(),
12731
- inferenceMs: number(),
12732
- modelId: string()
12733
- });
12734
12777
  var EngineProvisioningSchema = object({
12735
12778
  runtimeId: _enum([
12736
12779
  "onnx",
@@ -12747,15 +12790,42 @@ var EngineProvisioningSchema = object({
12747
12790
  ]),
12748
12791
  progress: number().optional(),
12749
12792
  error: string().optional(),
12750
- nextRetryAt: number().optional()
12793
+ nextRetryAt: number().optional(),
12794
+ /**
12795
+ * Gate A (config-correctness gate at engine change): human-readable
12796
+ * config issues surfaced EAGERLY when the node's engine changes — model
12797
+ * substitutions ("chose X, running Y") and zero-build steps ("no model
12798
+ * has a <format> build"). Additive/optional: informational only, never
12799
+ * enforced here — `assertEngineReady` (readiness) still gates inference.
12800
+ * Absent/empty when the node-default tree resolves cleanly.
12801
+ */
12802
+ configIssues: array(string()).optional()
12751
12803
  });
12752
12804
  var PipelineStepInputSchema = lazy(() => object({
12753
12805
  addonId: string(),
12754
- modelId: string(),
12806
+ modelId: string().optional(),
12755
12807
  enabled: boolean().default(true),
12756
12808
  children: array(PipelineStepInputSchema).optional(),
12757
12809
  settings: record(string(), unknown()).optional()
12758
12810
  }));
12811
+ var ModelSubstitutionSchema = object({
12812
+ addonId: string(),
12813
+ chosen: string(),
12814
+ running: string(),
12815
+ format: string()
12816
+ });
12817
+ var PipelineValidationIssueSchema = object({
12818
+ addonId: string(),
12819
+ kind: _enum(["unknown-addon", "no-format-build"]),
12820
+ detail: string()
12821
+ });
12822
+ var PipelineValidationResultSchema = object({
12823
+ ok: boolean(),
12824
+ issues: array(PipelineValidationIssueSchema).readonly(),
12825
+ substitutions: array(ModelSubstitutionSchema).readonly(),
12826
+ /** The node's `currentEngine.format` this validation ran against. */
12827
+ format: string()
12828
+ });
12759
12829
  var ReferenceImageEntrySchema = object({
12760
12830
  filename: string(),
12761
12831
  stepIds: array(string()).readonly().optional()
@@ -12826,7 +12896,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
12826
12896
  })) }), object({ success: literal(true) }), {
12827
12897
  kind: "mutation",
12828
12898
  auth: "admin"
12829
- }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
12899
+ }), method(object({ nodeId: string() }), object({
12900
+ success: literal(true),
12901
+ clearedDevices: number()
12902
+ }), {
12903
+ kind: "mutation",
12904
+ auth: "admin"
12905
+ }), 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({
12830
12906
  name: string(),
12831
12907
  steps: array(PipelineTemplateStepSchema).readonly(),
12832
12908
  engine: PipelineEngineChoiceSchema
@@ -12843,10 +12919,6 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
12843
12919
  modelId: string(),
12844
12920
  format: ModelFormatSchema$1
12845
12921
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
12846
- addonId: string(),
12847
- frame: FrameInputSchema,
12848
- config: record(string(), unknown()).optional()
12849
- }), DetectorOutputSchema), method(object({
12850
12922
  engine: PipelineEngineChoiceSchema.optional(),
12851
12923
  steps: array(PipelineStepInputSchema).min(1),
12852
12924
  frame: FrameInputSchema.optional(),
@@ -12867,7 +12939,15 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
12867
12939
  image: _instanceof(Uint8Array).optional(),
12868
12940
  referenceImage: string().optional(),
12869
12941
  deviceId: number().optional(),
12870
- sessionId: string().optional()
12942
+ sessionId: string().optional(),
12943
+ /**
12944
+ * Execution plane. 'full' (default) runs the whole tree — benchmark,
12945
+ * reference-image, and detail-subtree calls. 'frame' is the live
12946
+ * per-frame dispatch: ONLY root-plane steps run; crop children
12947
+ * (inputClasses ≠ null) are skipped and served per-track via
12948
+ * pipelineRunner.runDetailSubtree (two-plane design).
12949
+ */
12950
+ plane: _enum(["full", "frame"]).optional()
12871
12951
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
12872
12952
  engine: PipelineEngineChoiceSchema.optional(),
12873
12953
  steps: array(PipelineStepInputSchema).min(1),
@@ -13025,6 +13105,47 @@ var zonesCapability = {
13025
13105
  runtimeState: object({ zones: array(ZoneSchema).readonly() })
13026
13106
  };
13027
13107
  /**
13108
+ * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
13109
+ * decode worker resolves it against the RETAINED native frame's real pixel dims,
13110
+ * so the caller supplies only the detection-res bbox divided by the detection
13111
+ * dims — no native resolution to plumb.
13112
+ */
13113
+ var NativeCropBboxSchema = object({
13114
+ x: number(),
13115
+ y: number(),
13116
+ w: number(),
13117
+ h: number()
13118
+ });
13119
+ /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
13120
+ var NativeCropResultSchema = object({
13121
+ /** Packed rgb (24-bit) pixels of the crop. */
13122
+ bytes: _instanceof(Uint8Array),
13123
+ width: number().int().positive(),
13124
+ height: number().int().positive()
13125
+ });
13126
+ /** Parent detection context passed to `runDetailSubtree` — the crop's
13127
+ * originating detection, in FRAME-space coordinates. Reuses
13128
+ * `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
13129
+ * the coordinates are frame-space rather than getNativeCrop's
13130
+ * normalized [0,1] convention). */
13131
+ var DetailParentSchema = object({
13132
+ bbox: NativeCropBboxSchema,
13133
+ className: string()
13134
+ });
13135
+ /** One child-step result from `runDetailSubtree` — an embedding, label,
13136
+ * or refined detection produced by running the crop-subtree on a
13137
+ * single tracked detection. */
13138
+ var DetailResultSchema = object({
13139
+ stepId: string(),
13140
+ className: string(),
13141
+ score: number(),
13142
+ /** FRAME-space bbox (already mapped back from crop space). */
13143
+ bbox: NativeCropBboxSchema.optional(),
13144
+ embedding: string().optional(),
13145
+ label: string().optional(),
13146
+ alignedCropJpeg: string().optional()
13147
+ });
13148
+ /**
13028
13149
  * Per-camera tunable ranges + defaults. Single source of truth used
13029
13150
  * by both the Zod data schema (validation + default fallback) and
13030
13151
  * the device settings UI (slider min/max/step). Touch one place and
@@ -13119,6 +13240,13 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
13119
13240
  kind: literal("remote-restream"),
13120
13241
  /** The camera's source-owner node (slice 1: always the hub). */
13121
13242
  ownerNodeId: string(),
13243
+ /**
13244
+ * The owner's LAN-reachable host, resolved by the orchestrator from the
13245
+ * per-node `reachableHost` override (Cluster UI). When present the runner
13246
+ * dials THIS host for the owner's restream, in preference to the
13247
+ * `CAMSTACK_HUB_URL`-derived default. Absent → auto-detect fallback.
13248
+ */
13249
+ ownerReachableHost: string().optional(),
13122
13250
  /** Operator override for the owner host the runner dials. */
13123
13251
  hubHostnameOverride: string().optional()
13124
13252
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
@@ -13127,13 +13255,11 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
13127
13255
  * specific runner instance via `attachCamera`. Carries everything the
13128
13256
  * runner needs to subscribe to the local broker and execute inference.
13129
13257
  *
13130
- * Stateless-pipeline model: the full pipeline content (`engine`, `steps`,
13131
- * optional `audio`) travels with the attach payload. The runner keeps it
13132
- * in RAM for the lifetime of the attach — on rebalance, edit, or
13133
- * restart the orchestrator re-sends the latest snapshot.
13134
- *
13135
- * `engine`/`steps`/`audio` are optional during the additive migration
13136
- * window; once orchestrator + UI are migrated they become required.
13258
+ * Stateless-pipeline model: the pipeline content (`steps`, optional
13259
+ * `audio`) travels with the attach payload. The runner keeps it in RAM
13260
+ * for the lifetime of the attach — on rebalance, edit, or restart the
13261
+ * orchestrator re-sends the latest snapshot. Engine is NOT carried: it is
13262
+ * node-local, resolved by the executing runner at dispatch time.
13137
13263
  */
13138
13264
  var RunnerCameraConfigSchema = object({
13139
13265
  deviceId: number(),
@@ -13184,14 +13310,11 @@ var RunnerCameraConfigSchema = object({
13184
13310
  */
13185
13311
  motionSources: MotionSourcesSchema.default(["analyzer"]),
13186
13312
  pipelineEnabled: boolean().default(true),
13187
- /** Engine choice for video steps (runtime+backend+format). */
13188
- engine: PipelineEngineChoiceSchema.optional(),
13189
13313
  /** Ordered tree of video steps. Absent → runner skips video detection. */
13190
13314
  steps: array(PipelineStepInputSchema).readonly().optional(),
13191
13315
  /** Audio classification branch. `enabled:false` disables, null skips. */
13192
13316
  audio: object({
13193
- engine: PipelineEngineChoiceSchema,
13194
- modelId: string(),
13317
+ modelId: string().optional(),
13195
13318
  enabled: boolean()
13196
13319
  }).nullable().optional(),
13197
13320
  /**
@@ -13278,7 +13401,17 @@ var RunnerLocalMetricsSchema = object({
13278
13401
  avgInferenceTimeMs: number(),
13279
13402
  queueDepth: number()
13280
13403
  });
13281
- 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());
13404
+ 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({
13405
+ handle: FrameHandleSchema,
13406
+ bbox: NativeCropBboxSchema,
13407
+ maxWidth: number().int().positive().optional()
13408
+ }), NativeCropResultSchema.nullable()), method(object({
13409
+ deviceId: number(),
13410
+ frameHandle: FrameHandleSchema.optional(),
13411
+ cropJpeg: string().optional(),
13412
+ parent: DetailParentSchema,
13413
+ steps: array(string()).optional()
13414
+ }), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" });
13282
13415
  /**
13283
13416
  * Hardware / firmware motion sensor cap — binary detected state plus
13284
13417
  * a timestamp of the last observation. Distinct from
@@ -16209,7 +16342,9 @@ var AddonPageDeclarationSchema$1 = object({
16209
16342
  icon: string(),
16210
16343
  path: string(),
16211
16344
  remoteName: string(),
16212
- bundle: string()
16345
+ bundle: string(),
16346
+ section: string().optional(),
16347
+ sectionLabel: string().optional()
16213
16348
  });
16214
16349
  var AddonPageInfoSchema = object({
16215
16350
  addonId: string(),
@@ -16249,7 +16384,18 @@ var AddonPageDeclarationSchema = object({
16249
16384
  * the static-file route can compute an mtime-based cache-buster URL
16250
16385
  * without a separate filesystem stat.
16251
16386
  */
16252
- bundle: string()
16387
+ bundle: string(),
16388
+ /**
16389
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
16390
+ * `'cluster'`, `'administration'` — the page renders inside that group.
16391
+ * Any OTHER string creates (or joins) a custom section rendered after
16392
+ * the built-in groups; its label comes from `sectionLabel` (first
16393
+ * declaration wins), falling back to the id. Absent → the legacy
16394
+ * "Addon Pages" group.
16395
+ */
16396
+ section: string().optional(),
16397
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
16398
+ sectionLabel: string().optional()
16253
16399
  });
16254
16400
  method(_void(), array(AddonPageDeclarationSchema).readonly());
16255
16401
  var AddonHttpRouteSchema = object({
@@ -16465,6 +16611,17 @@ var WidgetMetadataSchema = object({
16465
16611
  deviceContext: boolean().default(false),
16466
16612
  integrationContext: boolean().default(false)
16467
16613
  }),
16614
+ /**
16615
+ * Loadable BEFORE authentication. The normal widget registry listing
16616
+ * (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
16617
+ * (the login page) cannot discover a widget through it. A widget that
16618
+ * declares `preAuth: true` marks itself as safe to mount on a pre-auth
16619
+ * screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
16620
+ * login-method contribution channel (see `login-method.cap.ts`) rather
16621
+ * than the authenticated registry, and its bundle is served by the
16622
+ * public `/api/addon-widgets/:addonId/*` static route. Defaults false.
16623
+ */
16624
+ preAuth: boolean().optional().default(false),
16468
16625
  /** Dashboard placement HINTS (operator can override per instance). */
16469
16626
  defaultSize: WidgetSizeEnum.default("md"),
16470
16627
  allowedSizes: array(WidgetSizeEnum).readonly().default([
@@ -16766,6 +16923,66 @@ method(object({
16766
16923
  password: string()
16767
16924
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
16768
16925
  /**
16926
+ * `login-method` — collection cap through which auth addons contribute
16927
+ * their pre-auth login surfaces to the login page. This is the SINGLE,
16928
+ * generic mechanism that supersedes the dead `auth.listProviders` reader:
16929
+ * every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
16930
+ * `login-method` provider and the PUBLIC `auth.listLoginMethods`
16931
+ * procedure aggregates them for the unauthenticated login page.
16932
+ *
16933
+ * A contribution is a discriminated union on `kind`:
16934
+ *
16935
+ * - `redirect` — a declarative button. The login page renders a generic
16936
+ * button that navigates to `startUrl` (an addon-owned HTTP route).
16937
+ * Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
16938
+ * ZERO shell-side JS. A future SSO addon plugs in the same way — the
16939
+ * login page needs NO change.
16940
+ *
16941
+ * - `widget` — a Module-Federation widget the login page mounts (via
16942
+ * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
16943
+ * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
16944
+ * addon bundle. The referenced widget also declares `preAuth: true` in
16945
+ * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
16946
+ * stamps a public `bundleUrl` from `addonId` + `bundle`.
16947
+ *
16948
+ * Every contribution carries a `stage`:
16949
+ * - `primary` — shown on the first credentials screen (OIDC /
16950
+ * magic-link buttons; a future usernameless passkey).
16951
+ * - `second-factor` — shown AFTER the password leg, gated on the
16952
+ * returned `factors` (passkey-as-2FA today).
16953
+ *
16954
+ * `mount: skip` — the cap is read server-side by the core auth router
16955
+ * (`registry.getCollection('login-method')`), never mounted as its own
16956
+ * tRPC router.
16957
+ */
16958
+ /** When a login method renders in the two-phase login flow. */
16959
+ var LoginStageEnum = _enum(["primary", "second-factor"]);
16960
+ /** One login-method contribution — redirect button OR pre-auth widget. */
16961
+ var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
16962
+ kind: literal("redirect"),
16963
+ /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
16964
+ id: string(),
16965
+ /** Operator-facing button label. */
16966
+ label: string(),
16967
+ /** lucide-react icon name. */
16968
+ icon: string().optional(),
16969
+ /** Addon-owned HTTP route the button navigates to (GET). */
16970
+ startUrl: string(),
16971
+ stage: LoginStageEnum
16972
+ }), object({
16973
+ kind: literal("widget"),
16974
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
16975
+ id: string(),
16976
+ /** Owning addon id — drives the public bundle URL + the MF namespace. */
16977
+ addonId: string(),
16978
+ /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
16979
+ bundle: string(),
16980
+ /** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
16981
+ remote: WidgetRemoteSchema,
16982
+ stage: LoginStageEnum
16983
+ })]);
16984
+ method(_void(), array(LoginMethodContributionSchema).readonly());
16985
+ /**
16769
16986
  * Orchestrator-side destination metadata. The orchestrator computes
16770
16987
  * `id = <addonId>:<subId>` from its provider lookup so consumers
16771
16988
  * (admin UI, restore flow) see one canonical key.
@@ -18869,7 +19086,17 @@ var TrackSchema = object({
18869
19086
  /** Cumulative normalized distance travelled (0..1 units = full frame width). */
18870
19087
  totalDistance: number(),
18871
19088
  state: TrackStateSchema,
18872
- active: boolean()
19089
+ active: boolean(),
19090
+ /** Deterministic key-event importance score in [0,1] (server-computed at
19091
+ * track expiry, recomputed on late label). Absent on legacy rows written
19092
+ * before scoring shipped — consumers degrade to absence / compute-on-read. */
19093
+ importance: number().optional(),
19094
+ /** Id of the track's highest-confidence ObjectEvent (its representative
19095
+ * "best" frame). Absent when the track produced no object events. */
19096
+ bestEventId: string().optional(),
19097
+ /** Tag of the importance sub-signal that dominated the score
19098
+ * (identity|dwell|proximity|class|confidence|travel|zone). */
19099
+ importanceReason: string().optional()
18873
19100
  });
18874
19101
  var BaseEventFields = {
18875
19102
  id: string(),
@@ -18934,8 +19161,18 @@ var ObjectEventSchema = object({
18934
19161
  frameHeight: number().optional(),
18935
19162
  /** MediaStore key for the crop attached to this event (if any). */
18936
19163
  mediaKey: string().optional(),
19164
+ /** Design B: MediaStore key of the track's native-resolution key frame (the
19165
+ * best-detection full frame). Resolve via the event-media data-plane
19166
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
19167
+ * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
19168
+ * sources — consumers fall back to `mediaKey` (the tight crop). */
19169
+ keyFrameMediaKey: string().optional(),
18937
19170
  /** Populated by B5 (recording playback URL for this event). */
18938
- mediaUrl: string().optional()
19171
+ mediaUrl: string().optional(),
19172
+ /** The parent track's key-event importance [0,1], propagated to every object
19173
+ * event of the track (so an event row can be sorted by importance without a
19174
+ * track join). Absent on legacy rows / before the track was scored. */
19175
+ importance: number().optional()
18939
19176
  });
18940
19177
  var AudioEventSchema = object({
18941
19178
  ...BaseEventFields,
@@ -18959,7 +19196,8 @@ var MediaFileKindEnum = _enum([
18959
19196
  "fullFrame",
18960
19197
  "fullFrameBoxed",
18961
19198
  "faceCrop",
18962
- "plateCrop"
19199
+ "plateCrop",
19200
+ "keyFrame"
18963
19201
  ]);
18964
19202
  var MediaFileSchema = object({
18965
19203
  key: string(),
@@ -18980,6 +19218,32 @@ var DeviceEventQueryInput = object({
18980
19218
  projection: _enum(["full", "slim"]).optional()
18981
19219
  });
18982
19220
  var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
19221
+ var KeyEventQueryInput = object({
19222
+ deviceId: number(),
19223
+ /** Window lower bound (track firstSeen ≥ since). */
19224
+ since: number(),
19225
+ /** Window upper bound (track firstSeen ≤ until). */
19226
+ until: number(),
19227
+ limit: number().int().min(1).max(200).default(50),
19228
+ /** Drop tracks scoring below this importance. */
19229
+ minImportance: number().min(0).max(1).optional(),
19230
+ /** Restrict to a single class (e.g. 'person'). */
19231
+ classFilter: string().optional()
19232
+ });
19233
+ var KeyEventSchema = object({
19234
+ /** The representative event id (the track's best ObjectEvent, else its trackId). */
19235
+ id: string(),
19236
+ trackId: string(),
19237
+ /** Track start time (firstSeen). */
19238
+ timestamp: number(),
19239
+ className: string(),
19240
+ label: string().optional(),
19241
+ importance: number(),
19242
+ /** Highest-confidence ObjectEvent id for the track (empty when none). */
19243
+ bestEventId: string(),
19244
+ /** Track lifetime in ms (lastSeen - firstSeen). */
19245
+ windowMs: number().optional()
19246
+ });
18983
19247
  var TrackedDetectionSchema = object({
18984
19248
  trackId: string(),
18985
19249
  className: string(),
@@ -19009,7 +19273,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19009
19273
  }), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
19010
19274
  kind: "mutation",
19011
19275
  auth: "admin"
19012
- }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
19276
+ }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19013
19277
  deviceId: number(),
19014
19278
  since: number(),
19015
19279
  until: number(),
@@ -19054,11 +19318,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19054
19318
  timestamp: number()
19055
19319
  });
19056
19320
  var CameraPipelineConfigSchema = object({
19057
- engine: PipelineEngineChoiceSchema,
19321
+ engine: PipelineEngineChoiceSchema.optional(),
19058
19322
  steps: array(PipelineStepInputSchema).readonly(),
19059
19323
  audio: object({
19060
- engine: PipelineEngineChoiceSchema,
19061
- modelId: string(),
19324
+ engine: PipelineEngineChoiceSchema.optional(),
19325
+ modelId: string().optional(),
19062
19326
  enabled: boolean(),
19063
19327
  settings: record(string(), unknown()).readonly().optional()
19064
19328
  }).nullable().optional()
@@ -19073,7 +19337,7 @@ var PipelineTemplateSchema = object({
19073
19337
  });
19074
19338
  var AgentAddonConfigSchema = object({
19075
19339
  enabled: boolean(),
19076
- modelId: string(),
19340
+ modelId: string().optional(),
19077
19341
  settings: record(string(), unknown()).readonly()
19078
19342
  });
19079
19343
  var AgentPipelineSettingsSchema = object({
@@ -19083,12 +19347,25 @@ var AgentPipelineSettingsSchema = object({
19083
19347
  detectWeight: number().positive().optional(),
19084
19348
  /** Node is eligible to run the detection pipeline (decode + inference). */
19085
19349
  detect: boolean().optional(),
19086
- /** Node is eligible to host decoder sessions. */
19350
+ /**
19351
+ * DEPRECATED AND IGNORED. Decode is always co-located with its frame
19352
+ * consumer, so decode eligibility IS detect eligibility. Kept optional in
19353
+ * the schema ONLY so persisted stores written before the removal still
19354
+ * parse — no code reads it and no write path emits it.
19355
+ */
19087
19356
  decode: boolean().optional(),
19088
19357
  /** Node is eligible to run audio-analyzer sessions. */
19089
19358
  audio: boolean().optional(),
19090
19359
  /** Node is eligible to be the ingest / source-owner (serve the restream). */
19091
- ingest: boolean().optional()
19360
+ ingest: boolean().optional(),
19361
+ /**
19362
+ * Operator override for the LAN host a cross-node decoder dials to reach
19363
+ * THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
19364
+ * falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
19365
+ * it already uses to reach the hub). Set this only when the auto-detected
19366
+ * address is wrong (multi-homed host, NAT, custom interface).
19367
+ */
19368
+ reachableHost: string().optional()
19092
19369
  });
19093
19370
  var CameraPipelineForAgentSchema = object({
19094
19371
  steps: array(PipelineStepInputSchema).readonly(),
@@ -19136,25 +19413,6 @@ var PipelineAssignmentSchema = object({
19136
19413
  assignedAt: number()
19137
19414
  });
19138
19415
  /**
19139
- * Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
19140
- * the decoder-node placement domain (`balanceDecoder` decision: manual pin
19141
- * → co-located with pipeline → capacity).
19142
- */
19143
- var DecoderAssignmentSchema = object({
19144
- deviceId: number(),
19145
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
19146
- decoderNodeId: string(),
19147
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
19148
- pinned: boolean(),
19149
- /** Why this assignment was made — useful for debugging the decoder balancer. */
19150
- reason: _enum([
19151
- "manual",
19152
- "co-located",
19153
- "capacity",
19154
- "hardware-affinity"
19155
- ])
19156
- });
19157
- /**
19158
19416
  * Per-agent load summary surfaced to the load balancer + dashboards.
19159
19417
  * Aggregated from each runner's `getLocalLoad` cap call.
19160
19418
  */
@@ -19194,6 +19452,15 @@ var GlobalMetricsSchema = object({
19194
19452
  * capability providers.
19195
19453
  */
19196
19454
  var CapabilityBindingsSchema = record(string(), string());
19455
+ /**
19456
+ * The cluster's single camera-source owner (`clusterRoles.ingestNode`) plus
19457
+ * its LAN-reachable host, if one is registered. See `getIngestOwner`.
19458
+ */
19459
+ var IngestOwnerSchema = object({
19460
+ ownerNodeId: string(),
19461
+ reachableHost: string().optional(),
19462
+ configIssue: string().optional()
19463
+ });
19197
19464
  /** Source block — always present; derives from the stream catalog. */
19198
19465
  var CameraSourceStatusSchema = object({ streams: array(object({
19199
19466
  camStreamId: string(),
@@ -19208,6 +19475,14 @@ var CameraAssignmentStatusSchema = object({
19208
19475
  detectionNodeId: string().nullable(),
19209
19476
  decoderNodeId: string().nullable(),
19210
19477
  audioNodeId: string().nullable(),
19478
+ /**
19479
+ * The node that OWNS this camera's physical source pull (dials the RTSP and
19480
+ * hosts the broker/restream) — the cluster ingest owner today
19481
+ * (`clusterRoles.ingestNode`), per-camera once source assignment lands. Lets
19482
+ * the UI show WHERE a camera is sourced without SSH/logs, and is the node the
19483
+ * broker block below was read from (pinned). Nullable only pre-wiring.
19484
+ */
19485
+ sourceNodeId: string().nullable(),
19211
19486
  pinned: object({
19212
19487
  detection: boolean(),
19213
19488
  decoder: boolean(),
@@ -19340,16 +19615,7 @@ method(object({
19340
19615
  }), object({ success: literal(true) }), {
19341
19616
  kind: "mutation",
19342
19617
  auth: "admin"
19343
- }), method(object({
19344
- deviceId: number(),
19345
- nodeId: string()
19346
- }), _void(), {
19347
- kind: "mutation",
19348
- auth: "admin"
19349
- }), method(object({ deviceId: number() }), _void(), {
19350
- kind: "mutation",
19351
- auth: "admin"
19352
- }), method(_void(), array(DecoderAssignmentSchema).readonly()), method(object({
19618
+ }), method(_void(), IngestOwnerSchema), method(object({
19353
19619
  deviceId: number(),
19354
19620
  nodeId: string()
19355
19621
  }), object({ success: literal(true) }), {
@@ -19370,10 +19636,7 @@ method(object({
19370
19636
  nodeId: string(),
19371
19637
  pinned: boolean(),
19372
19638
  assignedAt: number()
19373
- }))), method(object({
19374
- deviceId: number(),
19375
- pipelineNodeId: string().optional()
19376
- }), DecoderAssignmentSchema), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
19639
+ }))), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
19377
19640
  nodeId: string(),
19378
19641
  settings: AgentPipelineSettingsSchema
19379
19642
  })).readonly()), method(object({
@@ -19403,12 +19666,26 @@ method(object({
19403
19666
  }), method(object({
19404
19667
  agentNodeId: string(),
19405
19668
  detect: boolean().nullable().optional(),
19406
- decode: boolean().nullable().optional(),
19407
19669
  audio: boolean().nullable().optional(),
19408
19670
  ingest: boolean().nullable().optional()
19409
19671
  }), object({ success: literal(true) }), {
19410
19672
  kind: "mutation",
19411
19673
  auth: "admin"
19674
+ }), method(object({
19675
+ agentNodeId: string(),
19676
+ reachableHost: string().nullable()
19677
+ }), object({ success: literal(true) }), {
19678
+ kind: "mutation",
19679
+ auth: "admin"
19680
+ }), method(object({ agentNodeId: string() }), object({
19681
+ success: literal(true),
19682
+ /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
19683
+ effectiveModelId: string().nullable(),
19684
+ /** Number of cameras whose node-scoped overrides were cleared. */
19685
+ clearedCameraOverrides: number()
19686
+ }), {
19687
+ kind: "mutation",
19688
+ auth: "admin"
19412
19689
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
19413
19690
  deviceId: number(),
19414
19691
  addonId: string(),
@@ -19453,22 +19730,131 @@ method(object({
19453
19730
  kind: "mutation",
19454
19731
  auth: "admin"
19455
19732
  });
19456
- var RegisteredStreamSchema = object({
19457
- streamId: string(),
19458
- label: string().optional(),
19459
- codec: string(),
19460
- type: _enum(["video", "audio"]),
19461
- sourceUrl: string()
19733
+ /**
19734
+ * server-management — per-NODE singleton capability for a node's ROOT
19735
+ * package lifecycle (runtime-updatable node packages, phase 2: hub + docker
19736
+ * agents).
19737
+ *
19738
+ * Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
19739
+ * on agents) carries the whole software stack in its npm dep tree, so ONE
19740
+ * version describes the node. Updates install into
19741
+ * `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
19742
+ * starter (probation boot + auto-rollback to N-1).
19743
+ *
19744
+ * Providers:
19745
+ * - HUB: `ServerUpdateService` behind the `server-provided` mount
19746
+ * (`buildServerProviders` in trpc.router.ts) — the default target for
19747
+ * unpinned calls.
19748
+ * - AGENT: `AgentUpdateService` registered by the agent bootstrap under
19749
+ * the synthetic `agent-runtime` addonId and declared in the agent's
19750
+ * `$hub.registerNode` manifest.
19751
+ *
19752
+ * Node routing: singleton caps get the codegen/runtime-builder `nodeId`
19753
+ * injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
19754
+ * SDK) routes the call to that node's provider via the standard remote
19755
+ * proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
19756
+ * in-process provider lookup). No `nodeId` → the hub's own provider.
19757
+ *
19758
+ * Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
19759
+ */
19760
+ /**
19761
+ * Where the running hub's code was loaded from:
19762
+ * - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
19763
+ * plain resolution and runtime updates are refused.
19764
+ * - `baked` — the immutable image seed closure (no data-dir root active).
19765
+ * - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
19766
+ */
19767
+ var ServerBootModeSchema = _enum([
19768
+ "workspace",
19769
+ "baked",
19770
+ "data-root"
19771
+ ]);
19772
+ /**
19773
+ * Update lifecycle state:
19774
+ * - `idle` / `checking` / `staging` — steady / in-flight registry work.
19775
+ * - `pending-restart` — a version is staged and the node has NOT yet
19776
+ * restarted onto it (still running the OLD version).
19777
+ * - `awaiting-confirmation` — the node HAS restarted onto the staged version
19778
+ * (it is the active probation boot) and is waiting to confirm boot-health.
19779
+ * Apply/rollback are refused in this state and the node must NOT be
19780
+ * manually restarted, or the probation boot auto-rolls-back.
19781
+ */
19782
+ var ServerUpdateStateSchema = _enum([
19783
+ "idle",
19784
+ "checking",
19785
+ "staging",
19786
+ "pending-restart",
19787
+ "awaiting-confirmation"
19788
+ ]);
19789
+ var ServerRollbackInfoSchema = object({
19790
+ /** The version that failed (or was manually rolled back). */
19791
+ fromVersion: string(),
19792
+ /** The version rolled back to; null = the baked seed. */
19793
+ toVersion: string().nullable(),
19794
+ atMs: number(),
19795
+ reason: string()
19462
19796
  });
19463
- var ExposedResourceSchema = object({
19464
- streamId: string(),
19465
- format: string(),
19466
- value: string()
19797
+ var ServerPackageStatusSchema = object({
19798
+ /** Root package name (`@camstack/server` on the hub). */
19799
+ packageName: string(),
19800
+ /** Version of the code the running process ACTUALLY loaded. */
19801
+ runningVersion: string().nullable(),
19802
+ /** Node.js runtime version the node's process runs on (`process.versions.node`). */
19803
+ nodeRuntimeVersion: string().nullable(),
19804
+ /** Active data-dir root version; null when booted from seed/workspace. */
19805
+ activeVersion: string().nullable(),
19806
+ /** N-1 version kept for rollback; null when no previous version exists. */
19807
+ previousVersion: string().nullable(),
19808
+ /** Version of the immutable baked seed closure (image fallback). */
19809
+ seedVersion: string().nullable(),
19810
+ /** Latest registry version from the most recent check (null = never checked). */
19811
+ latestVersion: string().nullable(),
19812
+ updateAvailable: boolean(),
19813
+ bootMode: ServerBootModeSchema,
19814
+ updateState: ServerUpdateStateSchema,
19815
+ /** Version staged + awaiting its probation boot, when one is pending. */
19816
+ pendingVersion: string().nullable(),
19817
+ /** Set when the last freshly-activated version failed its boot health-check. */
19818
+ rolledBack: ServerRollbackInfoSchema.nullable(),
19819
+ /**
19820
+ * True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
19821
+ * hub is running from the baked seed (or workspace) while installed data-dir
19822
+ * versions are being IGNORED. Surfaced as a warning in the UI.
19823
+ */
19824
+ stateFileCorrupt: boolean(),
19825
+ lastCheckedAtMs: number().nullable()
19826
+ });
19827
+ var ServerUpdateCheckResultSchema = object({
19828
+ packageName: string(),
19829
+ runningVersion: string().nullable(),
19830
+ latestVersion: string().nullable(),
19831
+ updateAvailable: boolean(),
19832
+ checkedAtMs: number(),
19833
+ /** Non-null when the registry lookup failed (offline, bad registry, …). */
19834
+ error: string().nullable()
19835
+ });
19836
+ var ServerUpdateActionResultSchema = object({
19837
+ accepted: boolean(),
19838
+ targetVersion: string().nullable(),
19839
+ /** True when a graceful restart was scheduled to apply the change. */
19840
+ restarting: boolean(),
19841
+ message: string()
19842
+ });
19843
+ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
19844
+ kind: "mutation",
19845
+ auth: "admin"
19846
+ }), method(object({
19847
+ /** Explicit target version; omitted = latest from the registry. */
19848
+ version: string().optional() }), ServerUpdateActionResultSchema, {
19849
+ kind: "mutation",
19850
+ auth: "admin"
19851
+ }), method(_void(), ServerUpdateActionResultSchema, {
19852
+ kind: "mutation",
19853
+ auth: "admin"
19854
+ }), method(_void(), ServerUpdateActionResultSchema, {
19855
+ kind: "mutation",
19856
+ auth: "admin"
19467
19857
  });
19468
- method(object({
19469
- deviceId: number(),
19470
- streams: array(RegisteredStreamSchema).readonly()
19471
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(ExposedResourceSchema).readonly());
19472
19858
  /**
19473
19859
  * Query filter for settings-store collections.
19474
19860
  */
@@ -19621,9 +20007,9 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
19621
20007
  /**
19622
20008
  * A single device snapshot returned as base64 JPEG/PNG.
19623
20009
  *
19624
- * Shared with the `snapshot-provider` collection cap the orchestrator
19625
- * receives the same shape from each native provider and from the
19626
- * broker-based fallback.
20010
+ * The `SnapshotAddon` wrapper returns this shape whether the frame came from
20011
+ * the device-native provider (onboard capture) or from the stream-broker
20012
+ * prebuffer fallback.
19627
20013
  */
19628
20014
  var SnapshotImageSchema = object({
19629
20015
  base64: string(),
@@ -19654,11 +20040,12 @@ DeviceType.Camera, method(object({
19654
20040
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19655
20041
  kind: "mutation",
19656
20042
  auth: "admin"
19657
- });
19658
- method(object({ deviceId: number() }), boolean()), method(object({
20043
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
19659
20044
  deviceId: number(),
19660
- streamId: string().optional()
19661
- }), SnapshotImageSchema.nullable());
20045
+ lastCapturedAt: number().nullable(),
20046
+ cacheAgeMs: number().nullable(),
20047
+ etag: string().nullable()
20048
+ })));
19662
20049
  /**
19663
20050
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
19664
20051
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -19909,10 +20296,32 @@ method(_void(), array(TurnServerSchema).readonly());
19909
20296
  * b. `finishAuthentication({userId, response})` → server verifies
19910
20297
  * the assertion, bumps the credential counter, returns ok.
19911
20298
  *
20299
+ * 2b. Usernameless (discoverable-credential) authentication — the
20300
+ * passkey IS the primary factor, no password leg:
20301
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
20302
+ * EMPTY `allowCredentials` (the browser offers every resident
20303
+ * passkey it holds for this RP) + `userVerification: 'required'`
20304
+ * (the passkey replaces both factors, so UV is mandatory).
20305
+ * The challenge is stored server-side, NOT bound to any user.
20306
+ * b. `finishDiscoverableAuthentication({response})` → the provider
20307
+ * resolves the credential by the response's credential id,
20308
+ * verifies the assertion against the stored challenge + that
20309
+ * credential's public key/counter, and returns the OWNING
20310
+ * `userId` — the caller (core auth router) mints the session.
20311
+ *
19912
20312
  * 3. Management:
19913
20313
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
19914
20314
  * - `removePasskey({userId, credentialId})` — revoke one credential.
19915
20315
  *
20316
+ * 4. Second-factor preference (opt-in, default OFF):
20317
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
20318
+ * demanded as a second factor after a password login ONLY when the
20319
+ * user explicitly opts in via `setSecondFactorPreference`.
20320
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
20321
+ * row ⇒ `enabled: false`).
20322
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
20323
+ * the providing addon beside its credentials.
20324
+ *
19916
20325
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
19917
20326
  * the admin-ui composes the begin/finish round-trip and never exposes
19918
20327
  * the cap to non-admins.
@@ -19955,6 +20364,17 @@ method(object({
19955
20364
  }), object({ verified: boolean() }), {
19956
20365
  kind: "mutation",
19957
20366
  access: "view"
20367
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
20368
+ kind: "mutation",
20369
+ access: "view"
20370
+ }), method(object({
20371
+ /** AuthenticationResponseJSON from the browser. */
20372
+ response: record(string(), unknown()) }), object({
20373
+ verified: boolean(),
20374
+ userId: string().nullable()
20375
+ }), {
20376
+ kind: "mutation",
20377
+ access: "view"
19958
20378
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
19959
20379
  userId: string(),
19960
20380
  credentialId: string()
@@ -19962,6 +20382,13 @@ method(object({
19962
20382
  kind: "mutation",
19963
20383
  auth: "admin",
19964
20384
  access: "delete"
20385
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
20386
+ userId: string(),
20387
+ enabled: boolean()
20388
+ }), object({ success: literal(true) }), {
20389
+ kind: "mutation",
20390
+ auth: "admin",
20391
+ access: "create"
19965
20392
  });
19966
20393
  /**
19967
20394
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -20019,9 +20446,10 @@ method(object({
20019
20446
  auth: "admin"
20020
20447
  });
20021
20448
  /**
20022
- * Optional client-side hints sent at session creation to help the
20023
- * provider pick the best native source. All fields are optional —
20024
- * a viewer that knows nothing still gets a sane default.
20449
+ * Optional client-side hints sent at session creation to help the provider
20450
+ * pick the best native source. All fields optional — a viewer that knows
20451
+ * nothing still gets a sane default. (Relocated from the retired `webrtc`
20452
+ * collection cap; this `webrtc-session` cap is the live signaling surface.)
20025
20453
  */
20026
20454
  var webrtcClientHintsSchema = object({
20027
20455
  viewportWidth: number().int().positive().optional(),
@@ -20032,22 +20460,6 @@ var webrtcClientHintsSchema = object({
20032
20460
  /** Hard tier override; takes precedence over scoring when registered. */
20033
20461
  prefersTier: string().optional()
20034
20462
  }).partial();
20035
- method(object({
20036
- streamId: string(),
20037
- sdpOffer: string()
20038
- }), string(), { kind: "mutation" }), method(object({ streamId: string() }), boolean()), method(object({
20039
- streamId: string(),
20040
- codec: string()
20041
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
20042
- streamId: string(),
20043
- hints: webrtcClientHintsSchema.optional()
20044
- }), object({
20045
- sessionId: string(),
20046
- sdpOffer: string()
20047
- }), { kind: "mutation" }), method(object({
20048
- sessionId: string(),
20049
- sdpAnswer: string()
20050
- }), _void(), { kind: "mutation" }), method(object({ sessionId: string() }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), boolean());
20051
20463
  /**
20052
20464
  * Discriminated target for a WebRTC session. The client sends this
20053
20465
  * structured object instead of building / parsing brokerId strings;
@@ -20778,7 +21190,17 @@ var FaceInfoSchema = object({
20778
21190
  recognizedIdentityId: string().optional(),
20779
21191
  identityName: string().optional(),
20780
21192
  assigned: boolean(),
20781
- base64: string().optional()
21193
+ base64: string().optional(),
21194
+ /** Design B: the face bbox (pixel space) on the key frame — lets a detail
21195
+ * view draw the box over the native `keyFrameMediaKey` frame. Absent on
21196
+ * legacy rows written before design B. */
21197
+ faceBbox: BoundingBoxSchema.optional(),
21198
+ /** Design B: MediaStore key of the track's native-resolution key frame.
21199
+ * Fetch the native JPEG via the event-media data-plane
21200
+ * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
21201
+ * track produced no key frame (e.g. native/onboard source) — the UI falls
21202
+ * back to the inline `base64` face crop. */
21203
+ keyFrameMediaKey: string().optional()
20782
21204
  });
20783
21205
  var FaceFilterEnum = _enum([
20784
21206
  "unassigned",
@@ -21475,6 +21897,16 @@ var TopologyCategorySchema = object({
21475
21897
  healthy: number(),
21476
21898
  addons: array(TopologyCategoryAddonSchema).readonly()
21477
21899
  });
21900
+ /**
21901
+ * The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
21902
+ * `@camstack/agent` on agents) as reported by its `registerNode` manifest —
21903
+ * version visibility for the Server management surface. Nullable: offline
21904
+ * rows and pre-phase-2 nodes report none.
21905
+ */
21906
+ var TopologyRootPackageSchema = object({
21907
+ name: string(),
21908
+ version: string()
21909
+ });
21478
21910
  var TopologyNodeSchema = object({
21479
21911
  id: string(),
21480
21912
  name: string(),
@@ -21498,7 +21930,8 @@ var TopologyNodeSchema = object({
21498
21930
  status: string()
21499
21931
  })).readonly(),
21500
21932
  processes: array(TopologyProcessSchema).readonly(),
21501
- categories: array(TopologyCategorySchema).readonly()
21933
+ categories: array(TopologyCategorySchema).readonly(),
21934
+ rootPackage: TopologyRootPackageSchema.nullable()
21502
21935
  });
21503
21936
  var CapUsageEdgeSchema = object({
21504
21937
  callerAddonId: string(),
@@ -24298,6 +24731,12 @@ Object.freeze({
24298
24731
  addonId: null,
24299
24732
  access: "create"
24300
24733
  },
24734
+ "loginMethod.getLoginMethods": {
24735
+ capName: "login-method",
24736
+ capScope: "system",
24737
+ addonId: null,
24738
+ access: "view"
24739
+ },
24301
24740
  "mediaPlayer.next": {
24302
24741
  capName: "media-player",
24303
24742
  capScope: "device",
@@ -24880,6 +25319,12 @@ Object.freeze({
24880
25319
  addonId: null,
24881
25320
  access: "view"
24882
25321
  },
25322
+ "pipelineAnalytics.getKeyEvents": {
25323
+ capName: "pipeline-analytics",
25324
+ capScope: "device",
25325
+ addonId: null,
25326
+ access: "view"
25327
+ },
24883
25328
  "pipelineAnalytics.getMotionEvents": {
24884
25329
  capName: "pipeline-analytics",
24885
25330
  capScope: "device",
@@ -24928,23 +25373,23 @@ Object.freeze({
24928
25373
  addonId: null,
24929
25374
  access: "create"
24930
25375
  },
24931
- "pipelineExecutor.deleteModel": {
25376
+ "pipelineExecutor.clearDeviceOverrides": {
24932
25377
  capName: "pipeline-executor",
24933
25378
  capScope: "system",
24934
25379
  addonId: null,
24935
25380
  access: "delete"
24936
25381
  },
24937
- "pipelineExecutor.deleteTemplate": {
25382
+ "pipelineExecutor.deleteModel": {
24938
25383
  capName: "pipeline-executor",
24939
25384
  capScope: "system",
24940
25385
  addonId: null,
24941
25386
  access: "delete"
24942
25387
  },
24943
- "pipelineExecutor.detect": {
25388
+ "pipelineExecutor.deleteTemplate": {
24944
25389
  capName: "pipeline-executor",
24945
25390
  capScope: "system",
24946
25391
  addonId: null,
24947
- access: "view"
25392
+ access: "delete"
24948
25393
  },
24949
25394
  "pipelineExecutor.downloadModel": {
24950
25395
  capName: "pipeline-executor",
@@ -25138,13 +25583,13 @@ Object.freeze({
25138
25583
  addonId: null,
25139
25584
  access: "create"
25140
25585
  },
25141
- "pipelineOrchestrator.assignAudio": {
25142
- capName: "pipeline-orchestrator",
25586
+ "pipelineExecutor.validatePipeline": {
25587
+ capName: "pipeline-executor",
25143
25588
  capScope: "system",
25144
25589
  addonId: null,
25145
- access: "create"
25590
+ access: "view"
25146
25591
  },
25147
- "pipelineOrchestrator.assignDecoder": {
25592
+ "pipelineOrchestrator.assignAudio": {
25148
25593
  capName: "pipeline-orchestrator",
25149
25594
  capScope: "system",
25150
25595
  addonId: null,
@@ -25228,19 +25673,13 @@ Object.freeze({
25228
25673
  addonId: null,
25229
25674
  access: "view"
25230
25675
  },
25231
- "pipelineOrchestrator.getDecoderAssignment": {
25232
- capName: "pipeline-orchestrator",
25233
- capScope: "system",
25234
- addonId: null,
25235
- access: "view"
25236
- },
25237
- "pipelineOrchestrator.getDecoderAssignments": {
25676
+ "pipelineOrchestrator.getGlobalMetrics": {
25238
25677
  capName: "pipeline-orchestrator",
25239
25678
  capScope: "system",
25240
25679
  addonId: null,
25241
25680
  access: "view"
25242
25681
  },
25243
- "pipelineOrchestrator.getGlobalMetrics": {
25682
+ "pipelineOrchestrator.getIngestOwner": {
25244
25683
  capName: "pipeline-orchestrator",
25245
25684
  capScope: "system",
25246
25685
  addonId: null,
@@ -25282,6 +25721,12 @@ Object.freeze({
25282
25721
  addonId: null,
25283
25722
  access: "delete"
25284
25723
  },
25724
+ "pipelineOrchestrator.resetNodePipelineDefaults": {
25725
+ capName: "pipeline-orchestrator",
25726
+ capScope: "system",
25727
+ addonId: null,
25728
+ access: "delete"
25729
+ },
25285
25730
  "pipelineOrchestrator.resolvePipeline": {
25286
25731
  capName: "pipeline-orchestrator",
25287
25732
  capScope: "system",
@@ -25318,37 +25763,37 @@ Object.freeze({
25318
25763
  addonId: null,
25319
25764
  access: "create"
25320
25765
  },
25321
- "pipelineOrchestrator.setCameraPipelineForAgent": {
25766
+ "pipelineOrchestrator.setAgentReachableHost": {
25322
25767
  capName: "pipeline-orchestrator",
25323
25768
  capScope: "system",
25324
25769
  addonId: null,
25325
25770
  access: "create"
25326
25771
  },
25327
- "pipelineOrchestrator.setCameraStepOverride": {
25772
+ "pipelineOrchestrator.setCameraPipelineForAgent": {
25328
25773
  capName: "pipeline-orchestrator",
25329
25774
  capScope: "system",
25330
25775
  addonId: null,
25331
25776
  access: "create"
25332
25777
  },
25333
- "pipelineOrchestrator.setCameraStepToggle": {
25778
+ "pipelineOrchestrator.setCameraStepOverride": {
25334
25779
  capName: "pipeline-orchestrator",
25335
25780
  capScope: "system",
25336
25781
  addonId: null,
25337
25782
  access: "create"
25338
25783
  },
25339
- "pipelineOrchestrator.setCapabilityBinding": {
25784
+ "pipelineOrchestrator.setCameraStepToggle": {
25340
25785
  capName: "pipeline-orchestrator",
25341
25786
  capScope: "system",
25342
25787
  addonId: null,
25343
25788
  access: "create"
25344
25789
  },
25345
- "pipelineOrchestrator.unassignAudio": {
25790
+ "pipelineOrchestrator.setCapabilityBinding": {
25346
25791
  capName: "pipeline-orchestrator",
25347
25792
  capScope: "system",
25348
25793
  addonId: null,
25349
25794
  access: "create"
25350
25795
  },
25351
- "pipelineOrchestrator.unassignDecoder": {
25796
+ "pipelineOrchestrator.unassignAudio": {
25352
25797
  capName: "pipeline-orchestrator",
25353
25798
  capScope: "system",
25354
25799
  addonId: null,
@@ -25408,12 +25853,24 @@ Object.freeze({
25408
25853
  addonId: null,
25409
25854
  access: "view"
25410
25855
  },
25856
+ "pipelineRunner.getNativeCrop": {
25857
+ capName: "pipeline-runner",
25858
+ capScope: "system",
25859
+ addonId: null,
25860
+ access: "view"
25861
+ },
25411
25862
  "pipelineRunner.reportMotion": {
25412
25863
  capName: "pipeline-runner",
25413
25864
  capScope: "system",
25414
25865
  addonId: null,
25415
25866
  access: "create"
25416
25867
  },
25868
+ "pipelineRunner.runDetailSubtree": {
25869
+ capName: "pipeline-runner",
25870
+ capScope: "system",
25871
+ addonId: null,
25872
+ access: "create"
25873
+ },
25417
25874
  "plateGallery.correctPlateText": {
25418
25875
  capName: "plate-gallery",
25419
25876
  capScope: "system",
@@ -25648,33 +26105,45 @@ Object.freeze({
25648
26105
  addonId: null,
25649
26106
  access: "create"
25650
26107
  },
25651
- "restreamer.getExposedResources": {
25652
- capName: "restreamer",
26108
+ "scriptRunner.run": {
26109
+ capName: "script-runner",
26110
+ capScope: "device",
26111
+ addonId: null,
26112
+ access: "create"
26113
+ },
26114
+ "scriptRunner.stop": {
26115
+ capName: "script-runner",
26116
+ capScope: "device",
26117
+ addonId: null,
26118
+ access: "create"
26119
+ },
26120
+ "serverManagement.applyServerUpdate": {
26121
+ capName: "server-management",
25653
26122
  capScope: "system",
25654
26123
  addonId: null,
25655
- access: "view"
26124
+ access: "create"
25656
26125
  },
25657
- "restreamer.registerDevice": {
25658
- capName: "restreamer",
26126
+ "serverManagement.checkServerUpdate": {
26127
+ capName: "server-management",
25659
26128
  capScope: "system",
25660
26129
  addonId: null,
25661
26130
  access: "create"
25662
26131
  },
25663
- "restreamer.unregisterDevice": {
25664
- capName: "restreamer",
26132
+ "serverManagement.getServerPackageStatus": {
26133
+ capName: "server-management",
25665
26134
  capScope: "system",
25666
26135
  addonId: null,
25667
- access: "delete"
26136
+ access: "view"
25668
26137
  },
25669
- "scriptRunner.run": {
25670
- capName: "script-runner",
25671
- capScope: "device",
26138
+ "serverManagement.restartServer": {
26139
+ capName: "server-management",
26140
+ capScope: "system",
25672
26141
  addonId: null,
25673
26142
  access: "create"
25674
26143
  },
25675
- "scriptRunner.stop": {
25676
- capName: "script-runner",
25677
- capScope: "device",
26144
+ "serverManagement.rollbackServerUpdate": {
26145
+ capName: "server-management",
26146
+ capScope: "system",
25678
26147
  addonId: null,
25679
26148
  access: "create"
25680
26149
  },
@@ -25762,23 +26231,17 @@ Object.freeze({
25762
26231
  addonId: null,
25763
26232
  access: "view"
25764
26233
  },
25765
- "snapshot.invalidateCache": {
26234
+ "snapshot.getSnapshotOverview": {
25766
26235
  capName: "snapshot",
25767
26236
  capScope: "device",
25768
26237
  addonId: null,
25769
- access: "create"
25770
- },
25771
- "snapshotProvider.getSnapshot": {
25772
- capName: "snapshot-provider",
25773
- capScope: "system",
25774
- addonId: null,
25775
26238
  access: "view"
25776
26239
  },
25777
- "snapshotProvider.supportsDevice": {
25778
- capName: "snapshot-provider",
25779
- capScope: "system",
26240
+ "snapshot.invalidateCache": {
26241
+ capName: "snapshot",
26242
+ capScope: "device",
25780
26243
  addonId: null,
25781
- access: "view"
26244
+ access: "create"
25782
26245
  },
25783
26246
  "ssoBridge.signBridgeToken": {
25784
26247
  capName: "sso-bridge",
@@ -26206,30 +26669,6 @@ Object.freeze({
26206
26669
  addonId: null,
26207
26670
  access: "view"
26208
26671
  },
26209
- "streamingEngine.getStreamUrl": {
26210
- capName: "streaming-engine",
26211
- capScope: "system",
26212
- addonId: null,
26213
- access: "view"
26214
- },
26215
- "streamingEngine.listStreams": {
26216
- capName: "streaming-engine",
26217
- capScope: "system",
26218
- addonId: null,
26219
- access: "view"
26220
- },
26221
- "streamingEngine.registerStream": {
26222
- capName: "streaming-engine",
26223
- capScope: "system",
26224
- addonId: null,
26225
- access: "create"
26226
- },
26227
- "streamingEngine.unregisterStream": {
26228
- capName: "streaming-engine",
26229
- capScope: "system",
26230
- addonId: null,
26231
- access: "delete"
26232
- },
26233
26672
  "streamParams.getConfigSchema": {
26234
26673
  capName: "stream-params",
26235
26674
  capScope: "device",
@@ -26476,6 +26915,12 @@ Object.freeze({
26476
26915
  addonId: null,
26477
26916
  access: "view"
26478
26917
  },
26918
+ "userPasskeys.beginDiscoverableAuthentication": {
26919
+ capName: "user-passkeys",
26920
+ capScope: "system",
26921
+ addonId: null,
26922
+ access: "view"
26923
+ },
26479
26924
  "userPasskeys.beginRegistration": {
26480
26925
  capName: "user-passkeys",
26481
26926
  capScope: "system",
@@ -26488,12 +26933,24 @@ Object.freeze({
26488
26933
  addonId: null,
26489
26934
  access: "view"
26490
26935
  },
26936
+ "userPasskeys.finishDiscoverableAuthentication": {
26937
+ capName: "user-passkeys",
26938
+ capScope: "system",
26939
+ addonId: null,
26940
+ access: "view"
26941
+ },
26491
26942
  "userPasskeys.finishRegistration": {
26492
26943
  capName: "user-passkeys",
26493
26944
  capScope: "system",
26494
26945
  addonId: null,
26495
26946
  access: "create"
26496
26947
  },
26948
+ "userPasskeys.getSecondFactorPreference": {
26949
+ capName: "user-passkeys",
26950
+ capScope: "system",
26951
+ addonId: null,
26952
+ access: "view"
26953
+ },
26497
26954
  "userPasskeys.listPasskeys": {
26498
26955
  capName: "user-passkeys",
26499
26956
  capScope: "system",
@@ -26506,6 +26963,12 @@ Object.freeze({
26506
26963
  addonId: null,
26507
26964
  access: "delete"
26508
26965
  },
26966
+ "userPasskeys.setSecondFactorPreference": {
26967
+ capName: "user-passkeys",
26968
+ capScope: "system",
26969
+ addonId: null,
26970
+ access: "create"
26971
+ },
26509
26972
  "vacuumControl.locate": {
26510
26973
  capName: "vacuum-control",
26511
26974
  capScope: "device",
@@ -26578,6 +27041,18 @@ Object.freeze({
26578
27041
  addonId: null,
26579
27042
  access: "view"
26580
27043
  },
27044
+ "viewerUi.getStaticDir": {
27045
+ capName: "viewer-ui",
27046
+ capScope: "system",
27047
+ addonId: null,
27048
+ access: "view"
27049
+ },
27050
+ "viewerUi.getVersion": {
27051
+ capName: "viewer-ui",
27052
+ capScope: "system",
27053
+ addonId: null,
27054
+ access: "view"
27055
+ },
26581
27056
  "waterHeater.setAway": {
26582
27057
  capName: "water-heater",
26583
27058
  capScope: "device",
@@ -26596,54 +27071,6 @@ Object.freeze({
26596
27071
  addonId: null,
26597
27072
  access: "create"
26598
27073
  },
26599
- "webrtc.closeSession": {
26600
- capName: "webrtc",
26601
- capScope: "system",
26602
- addonId: null,
26603
- access: "create"
26604
- },
26605
- "webrtc.createSession": {
26606
- capName: "webrtc",
26607
- capScope: "system",
26608
- addonId: null,
26609
- access: "create"
26610
- },
26611
- "webrtc.handleAnswer": {
26612
- capName: "webrtc",
26613
- capScope: "system",
26614
- addonId: null,
26615
- access: "create"
26616
- },
26617
- "webrtc.handleOffer": {
26618
- capName: "webrtc",
26619
- capScope: "system",
26620
- addonId: null,
26621
- access: "create"
26622
- },
26623
- "webrtc.hasAdaptiveBitrate": {
26624
- capName: "webrtc",
26625
- capScope: "system",
26626
- addonId: null,
26627
- access: "view"
26628
- },
26629
- "webrtc.registerStream": {
26630
- capName: "webrtc",
26631
- capScope: "system",
26632
- addonId: null,
26633
- access: "create"
26634
- },
26635
- "webrtc.supportsStream": {
26636
- capName: "webrtc",
26637
- capScope: "system",
26638
- addonId: null,
26639
- access: "view"
26640
- },
26641
- "webrtc.unregisterStream": {
26642
- capName: "webrtc",
26643
- capScope: "system",
26644
- addonId: null,
26645
- access: "delete"
26646
- },
26647
27074
  "webrtcSession.addIceCandidate": {
26648
27075
  capName: "webrtc-session",
26649
27076
  capScope: "device",