@camstack/addon-post-analysis 1.1.23 → 1.1.25

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.
@@ -4649,7 +4649,7 @@ function _instanceof(cls, params = {}) {
4649
4649
  return inst;
4650
4650
  }
4651
4651
  //#endregion
4652
- //#region ../types/dist/sleep-CZDdRBua.mjs
4652
+ //#region ../types/dist/sleep-b4Jf2n33.mjs
4653
4653
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4654
4654
  EventCategory["SystemBoot"] = "system.boot";
4655
4655
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -4835,6 +4835,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4835
4835
  */
4836
4836
  EventCategory["PipelineCameraUpdated"] = "pipeline.camera-updated";
4837
4837
  /**
4838
+ * The cluster camera-source OWNER changed (`clusterRoles.ingestNode`).
4839
+ * Emitted by addon-pipeline-orchestrator whenever it (re)derives node
4840
+ * capabilities — at boot, on agent online/offline, and on an ingest-node
4841
+ * flip. Carries the resolved `ownerNodeId`. The stream-broker consumes it to
4842
+ * keep its ingest-owner-gate decision current WITHOUT a per-`ensureBroker`
4843
+ * cross-process `getIngestOwner` query (push the authority's decision instead
4844
+ * of polling it on the hot path). Idempotent state — re-emitted on every
4845
+ * topology change, so a dropped event self-heals on the next one (plus the
4846
+ * broker's long backstop reconcile query).
4847
+ */
4848
+ EventCategory["PipelineIngestOwnerChanged"] = "pipeline.ingest-owner-changed";
4849
+ /**
4838
4850
  * Periodic snapshot of per-node pipeline-runner load
4839
4851
  * (`RunnerLocalLoad`). Emitted ~1Hz by every runner so UI dashboards
4840
4852
  * subscribe instead of polling `pipelineRunner.getLocalLoad`.
@@ -5358,10 +5370,6 @@ function hydrateField(field, values) {
5358
5370
  };
5359
5371
  }
5360
5372
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
5361
- if (field.type === "password") return {
5362
- ...field,
5363
- value: ""
5364
- };
5365
5373
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
5366
5374
  return {
5367
5375
  ...field,
@@ -6750,6 +6758,21 @@ function method(input, output, options) {
6750
6758
  timeoutMs: options?.timeoutMs
6751
6759
  };
6752
6760
  }
6761
+ /**
6762
+ * A wrapper/system-only method: served exclusively by the cap's system-level
6763
+ * provider (`InferProvider`), and OPTIONAL on `InferNativeProvider` so per-device
6764
+ * driver natives don't stub out a wrapper concern (e.g. a cross-device cache
6765
+ * overview). The `systemOnly: true` literal is what `InferNativeProvider` keys on.
6766
+ */
6767
+ function systemMethod(input, output, options) {
6768
+ return {
6769
+ ...method(input, output, options),
6770
+ systemOnly: true
6771
+ };
6772
+ }
6773
+ var StaticDirOutputSchema$1 = object({ staticDir: string() });
6774
+ var VersionOutputSchema$1 = object({ version: string() });
6775
+ method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
6753
6776
  var StaticDirOutputSchema = object({ staticDir: string() });
6754
6777
  var VersionOutputSchema = object({ version: string() });
6755
6778
  method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
@@ -6931,6 +6954,36 @@ var ModelFormatsSchema = object({
6931
6954
  tflite: ModelFormatEntrySchema.optional(),
6932
6955
  pt: ModelFormatEntrySchema.optional()
6933
6956
  });
6957
+ /**
6958
+ * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
6959
+ * the reduced `PipelineModelOption` returned in `pipeline.getSchema()` so the
6960
+ * grouped Family→Tier→Variant picker renders identically in the config UI and
6961
+ * in the pipeline/device steppers. The flat `id` stays the source of truth for
6962
+ * resolution/download/persistence; this is a presentation overlay resolved back
6963
+ * to an `id`.
6964
+ */
6965
+ var ModelVariantGroupSchema = object({
6966
+ /** Top-level family, e.g. `yolo26` (later `d-fine`, `rf-detr`). */
6967
+ family: string(),
6968
+ /** Size within the family, e.g. `n` | `s` | `m` | `l`. */
6969
+ tier: string(),
6970
+ /** Quantization axis. Omit ⇒ the fp32 base build. */
6971
+ precision: _enum(["fp32", "int8"]).optional(),
6972
+ /**
6973
+ * Speed-optimization axis. Omit ⇒ the standard build. `fast` marks a
6974
+ * latency-optimized export (e.g. ReLU-activation variant) — the slot the
6975
+ * future performance variants plug into.
6976
+ */
6977
+ optimization: _enum(["standard", "fast"]).optional(),
6978
+ /**
6979
+ * Input-resolution axis (square input side, px). Omit ⇒ the family's native
6980
+ * resolution (640 for yolo26). Reduced-input builds (320 / 256) are a big,
6981
+ * cheap latency lever — especially on Apple ANE and the Intel N100 — at a
6982
+ * small-object accuracy cost. Mirrors the model's `inputSize` but lifted onto
6983
+ * the group so the selector can offer it as a variant axis.
6984
+ */
6985
+ resolution: number().int().positive().optional()
6986
+ });
6934
6987
  var ModelCatalogEntrySchema = object({
6935
6988
  id: string(),
6936
6989
  name: string(),
@@ -6960,7 +7013,43 @@ var ModelCatalogEntrySchema = object({
6960
7013
  * Auxiliary files required at runtime (labels JSON, charset dict, etc.).
6961
7014
  * Downloaded into the same modelsDir alongside the model file.
6962
7015
  */
6963
- extraFiles: array(ModelExtraFileSchema).readonly().optional()
7016
+ extraFiles: array(ModelExtraFileSchema).readonly().optional(),
7017
+ /**
7018
+ * LEGACY entry — retained in the catalog so a persisted operator selection
7019
+ * still RESOLVES (and can be re-activated), but hidden from the selectable
7020
+ * model list and excluded from the auto format-default pick. Set on the
7021
+ * superseded / consolidated models (older lineages, redundant fp16 IRs) so
7022
+ * the active lineup stays the coherent curated ladder without deleting a
7023
+ * model anyone may still be pinned to. `resolveModelForFormat` keeps honoring
7024
+ * an explicit legacy id that has a build for the node's format.
7025
+ */
7026
+ legacy: boolean().optional(),
7027
+ /**
7028
+ * Measured quality/latency metadata — populated from the benchmark addon on
7029
+ * the real node classes. Absent = not yet measured (most entries today; the
7030
+ * catalog historically carried only `sizeMB`, a poor cross-architecture
7031
+ * speed proxy). `p95LatencyMs` is keyed by node class (e.g. `n100`, `mac`).
7032
+ */
7033
+ metrics: object({
7034
+ map50: number().optional(),
7035
+ p95LatencyMs: record(string(), number()).optional()
7036
+ }).optional(),
7037
+ /**
7038
+ * SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
7039
+ * YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
7040
+ * the retraining addon and any future commercial distribution.
7041
+ */
7042
+ license: string().optional(),
7043
+ /**
7044
+ * Variant-selector grouping. The UI groups models by `family` + `tier` and
7045
+ * offers `precision` / `optimization` as variant axes WITHIN a tier — so all
7046
+ * of a family's sizes and quantizations collapse into one grouped picker
7047
+ * instead of a flat list of `yolo26s`, `yolo26s-int8`, … Absent ⇒ ungrouped
7048
+ * (legacy / custom models) — never shown in the grouped selector. The flat
7049
+ * `id` stays the source of truth for resolution/download/persistence; grouping
7050
+ * is a presentation overlay resolved back to an `id`.
7051
+ */
7052
+ group: ModelVariantGroupSchema.optional()
6964
7053
  });
6965
7054
  var ConvertTargetSchema = discriminatedUnion("format", [object({
6966
7055
  format: literal("openvino"),
@@ -7040,8 +7129,8 @@ var RecordingModeSchema = _enum([
7040
7129
  "onAudioThreshold"
7041
7130
  ]);
7042
7131
  /**
7043
- * First-class, authoritative per-camera storage mode — the netta choice the UI
7044
- * reads directly (never inferred from `rules`):
7132
+ * First-class, authoritative per-camera storage mode — the explicit choice the
7133
+ * UI reads directly (never inferred from `rules`):
7045
7134
  * - `off` — not recording.
7046
7135
  * - `events` — record only around triggers (motion / audio threshold),
7047
7136
  * with pre/post-buffer.
@@ -8735,26 +8824,13 @@ DeviceType.Light, method(object({
8735
8824
  percentage: number().min(0).max(100),
8736
8825
  lastChangedAt: number()
8737
8826
  });
8827
+ /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
8738
8828
  var StreamFormatSchema = _enum([
8739
8829
  "webrtc",
8740
8830
  "hls",
8741
8831
  "mjpeg",
8742
8832
  "rtsp"
8743
8833
  ]);
8744
- var StreamInfoSchema = object({
8745
- streamId: string(),
8746
- format: StreamFormatSchema,
8747
- url: string().nullable(),
8748
- active: boolean()
8749
- });
8750
- method(object({
8751
- streamId: string(),
8752
- sourceUrl: string(),
8753
- codec: string().optional()
8754
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
8755
- streamId: string(),
8756
- format: StreamFormatSchema
8757
- }), string().nullable()), method(_void(), array(StreamInfoSchema));
8758
8834
  var RtspRestreamEntrySchema = object({
8759
8835
  brokerId: string(),
8760
8836
  url: string(),
@@ -9419,7 +9495,7 @@ var ConsumablesStatusSchema = object({
9419
9495
  })),
9420
9496
  lastChangedAt: number()
9421
9497
  });
9422
- 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({
9498
+ Object.values(DeviceType), method(object({
9423
9499
  deviceId: number().int().nonnegative(),
9424
9500
  key: string().min(1)
9425
9501
  }), _void(), {
@@ -10334,7 +10410,7 @@ var BoundingBoxSchema = object({
10334
10410
  w: number(),
10335
10411
  h: number()
10336
10412
  });
10337
- var SpatialDetectionSchema = object({
10413
+ object({
10338
10414
  class: string(),
10339
10415
  originalClass: string(),
10340
10416
  score: number(),
@@ -10469,7 +10545,6 @@ var PipelineDefaultStepSchema = lazy(() => object({
10469
10545
  enabled: boolean(),
10470
10546
  modelId: string(),
10471
10547
  children: array(PipelineDefaultStepSchema).readonly(),
10472
- engine: PipelineEngineChoiceSchema.optional(),
10473
10548
  group: string().optional(),
10474
10549
  settings: record(string(), unknown()).optional()
10475
10550
  }));
@@ -10494,7 +10569,9 @@ var PipelineModelOptionSchema = object({
10494
10569
  formats: record(string(), object({
10495
10570
  downloaded: boolean(),
10496
10571
  sizeMB: number()
10497
- }))
10572
+ })),
10573
+ group: ModelVariantGroupSchema.optional(),
10574
+ legacy: boolean().optional()
10498
10575
  });
10499
10576
  var ConfigFieldBridge = custom();
10500
10577
  var PipelineAddonSchemaSchema = object({
@@ -10508,6 +10585,7 @@ var PipelineAddonSchemaSchema = object({
10508
10585
  defaultModelId: string(),
10509
10586
  defaultModelIdByFormat: record(string(), string()).optional(),
10510
10587
  enabledByDefault: boolean().optional(),
10588
+ backfillIntoExistingOverrides: boolean().optional(),
10511
10589
  defaultConfidence: number(),
10512
10590
  group: string().optional(),
10513
10591
  configSchema: array(ConfigFieldBridge).readonly().optional()
@@ -10524,11 +10602,6 @@ var PipelineSchemaSchema = object({
10524
10602
  selectedEngine: PipelineEngineChoiceSchema,
10525
10603
  slots: array(PipelineSlotSchemaSchema).readonly()
10526
10604
  });
10527
- var DetectorOutputSchema = object({
10528
- detections: array(SpatialDetectionSchema).readonly(),
10529
- inferenceMs: number(),
10530
- modelId: string()
10531
- });
10532
10605
  var EngineProvisioningSchema = object({
10533
10606
  runtimeId: _enum([
10534
10607
  "onnx",
@@ -10545,15 +10618,42 @@ var EngineProvisioningSchema = object({
10545
10618
  ]),
10546
10619
  progress: number().optional(),
10547
10620
  error: string().optional(),
10548
- nextRetryAt: number().optional()
10621
+ nextRetryAt: number().optional(),
10622
+ /**
10623
+ * Gate A (config-correctness gate at engine change): human-readable
10624
+ * config issues surfaced EAGERLY when the node's engine changes — model
10625
+ * substitutions ("chose X, running Y") and zero-build steps ("no model
10626
+ * has a <format> build"). Additive/optional: informational only, never
10627
+ * enforced here — `assertEngineReady` (readiness) still gates inference.
10628
+ * Absent/empty when the node-default tree resolves cleanly.
10629
+ */
10630
+ configIssues: array(string()).optional()
10549
10631
  });
10550
10632
  var PipelineStepInputSchema = lazy(() => object({
10551
10633
  addonId: string(),
10552
- modelId: string(),
10634
+ modelId: string().optional(),
10553
10635
  enabled: boolean().default(true),
10554
10636
  children: array(PipelineStepInputSchema).optional(),
10555
10637
  settings: record(string(), unknown()).optional()
10556
10638
  }));
10639
+ var ModelSubstitutionSchema = object({
10640
+ addonId: string(),
10641
+ chosen: string(),
10642
+ running: string(),
10643
+ format: string()
10644
+ });
10645
+ var PipelineValidationIssueSchema = object({
10646
+ addonId: string(),
10647
+ kind: _enum(["unknown-addon", "no-format-build"]),
10648
+ detail: string()
10649
+ });
10650
+ var PipelineValidationResultSchema = object({
10651
+ ok: boolean(),
10652
+ issues: array(PipelineValidationIssueSchema).readonly(),
10653
+ substitutions: array(ModelSubstitutionSchema).readonly(),
10654
+ /** The node's `currentEngine.format` this validation ran against. */
10655
+ format: string()
10656
+ });
10557
10657
  var ReferenceImageEntrySchema = object({
10558
10658
  filename: string(),
10559
10659
  stepIds: array(string()).readonly().optional()
@@ -10624,7 +10724,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
10624
10724
  })) }), object({ success: literal(true) }), {
10625
10725
  kind: "mutation",
10626
10726
  auth: "admin"
10627
- }), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
10727
+ }), method(object({ nodeId: string() }), object({
10728
+ success: literal(true),
10729
+ clearedDevices: number()
10730
+ }), {
10731
+ kind: "mutation",
10732
+ auth: "admin"
10733
+ }), 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({
10628
10734
  name: string(),
10629
10735
  steps: array(PipelineTemplateStepSchema).readonly(),
10630
10736
  engine: PipelineEngineChoiceSchema
@@ -10641,10 +10747,6 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
10641
10747
  modelId: string(),
10642
10748
  format: ModelFormatSchema$1
10643
10749
  }), object({ success: literal(true) }), { kind: "mutation" }), method(object({
10644
- addonId: string(),
10645
- frame: FrameInputSchema,
10646
- config: record(string(), unknown()).optional()
10647
- }), DetectorOutputSchema), method(object({
10648
10750
  engine: PipelineEngineChoiceSchema.optional(),
10649
10751
  steps: array(PipelineStepInputSchema).min(1),
10650
10752
  frame: FrameInputSchema.optional(),
@@ -10884,6 +10986,13 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
10884
10986
  kind: literal("remote-restream"),
10885
10987
  /** The camera's source-owner node (slice 1: always the hub). */
10886
10988
  ownerNodeId: string(),
10989
+ /**
10990
+ * The owner's LAN-reachable host, resolved by the orchestrator from the
10991
+ * per-node `reachableHost` override (Cluster UI). When present the runner
10992
+ * dials THIS host for the owner's restream, in preference to the
10993
+ * `CAMSTACK_HUB_URL`-derived default. Absent → auto-detect fallback.
10994
+ */
10995
+ ownerReachableHost: string().optional(),
10887
10996
  /** Operator override for the owner host the runner dials. */
10888
10997
  hubHostnameOverride: string().optional()
10889
10998
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
@@ -10892,13 +11001,11 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
10892
11001
  * specific runner instance via `attachCamera`. Carries everything the
10893
11002
  * runner needs to subscribe to the local broker and execute inference.
10894
11003
  *
10895
- * Stateless-pipeline model: the full pipeline content (`engine`, `steps`,
10896
- * optional `audio`) travels with the attach payload. The runner keeps it
10897
- * in RAM for the lifetime of the attach — on rebalance, edit, or
10898
- * restart the orchestrator re-sends the latest snapshot.
10899
- *
10900
- * `engine`/`steps`/`audio` are optional during the additive migration
10901
- * window; once orchestrator + UI are migrated they become required.
11004
+ * Stateless-pipeline model: the pipeline content (`steps`, optional
11005
+ * `audio`) travels with the attach payload. The runner keeps it in RAM
11006
+ * for the lifetime of the attach — on rebalance, edit, or restart the
11007
+ * orchestrator re-sends the latest snapshot. Engine is NOT carried: it is
11008
+ * node-local, resolved by the executing runner at dispatch time.
10902
11009
  */
10903
11010
  var RunnerCameraConfigSchema = object({
10904
11011
  deviceId: number(),
@@ -10949,14 +11056,11 @@ var RunnerCameraConfigSchema = object({
10949
11056
  */
10950
11057
  motionSources: MotionSourcesSchema.default(["analyzer"]),
10951
11058
  pipelineEnabled: boolean().default(true),
10952
- /** Engine choice for video steps (runtime+backend+format). */
10953
- engine: PipelineEngineChoiceSchema.optional(),
10954
11059
  /** Ordered tree of video steps. Absent → runner skips video detection. */
10955
11060
  steps: array(PipelineStepInputSchema).readonly().optional(),
10956
11061
  /** Audio classification branch. `enabled:false` disables, null skips. */
10957
11062
  audio: object({
10958
- engine: PipelineEngineChoiceSchema,
10959
- modelId: string(),
11063
+ modelId: string().optional(),
10960
11064
  enabled: boolean()
10961
11065
  }).nullable().optional(),
10962
11066
  /**
@@ -12386,7 +12490,9 @@ var AddonPageDeclarationSchema$1 = object({
12386
12490
  icon: string(),
12387
12491
  path: string(),
12388
12492
  remoteName: string(),
12389
- bundle: string()
12493
+ bundle: string(),
12494
+ section: string().optional(),
12495
+ sectionLabel: string().optional()
12390
12496
  });
12391
12497
  var AddonPageInfoSchema = object({
12392
12498
  addonId: string(),
@@ -12426,7 +12532,18 @@ var AddonPageDeclarationSchema = object({
12426
12532
  * the static-file route can compute an mtime-based cache-buster URL
12427
12533
  * without a separate filesystem stat.
12428
12534
  */
12429
- bundle: string()
12535
+ bundle: string(),
12536
+ /**
12537
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
12538
+ * `'cluster'`, `'administration'` — the page renders inside that group.
12539
+ * Any OTHER string creates (or joins) a custom section rendered after
12540
+ * the built-in groups; its label comes from `sectionLabel` (first
12541
+ * declaration wins), falling back to the id. Absent → the legacy
12542
+ * "Addon Pages" group.
12543
+ */
12544
+ section: string().optional(),
12545
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
12546
+ sectionLabel: string().optional()
12430
12547
  });
12431
12548
  method(_void(), array(AddonPageDeclarationSchema).readonly());
12432
12549
  var AddonHttpRouteSchema = object({
@@ -12642,6 +12759,17 @@ var WidgetMetadataSchema = object({
12642
12759
  deviceContext: boolean().default(false),
12643
12760
  integrationContext: boolean().default(false)
12644
12761
  }),
12762
+ /**
12763
+ * Loadable BEFORE authentication. The normal widget registry listing
12764
+ * (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
12765
+ * (the login page) cannot discover a widget through it. A widget that
12766
+ * declares `preAuth: true` marks itself as safe to mount on a pre-auth
12767
+ * screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
12768
+ * login-method contribution channel (see `login-method.cap.ts`) rather
12769
+ * than the authenticated registry, and its bundle is served by the
12770
+ * public `/api/addon-widgets/:addonId/*` static route. Defaults false.
12771
+ */
12772
+ preAuth: boolean().optional().default(false),
12645
12773
  /** Dashboard placement HINTS (operator can override per instance). */
12646
12774
  defaultSize: WidgetSizeEnum.default("md"),
12647
12775
  allowedSizes: array(WidgetSizeEnum).readonly().default([
@@ -12949,6 +13077,66 @@ method(object({
12949
13077
  password: string()
12950
13078
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12951
13079
  /**
13080
+ * `login-method` — collection cap through which auth addons contribute
13081
+ * their pre-auth login surfaces to the login page. This is the SINGLE,
13082
+ * generic mechanism that supersedes the dead `auth.listProviders` reader:
13083
+ * every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
13084
+ * `login-method` provider and the PUBLIC `auth.listLoginMethods`
13085
+ * procedure aggregates them for the unauthenticated login page.
13086
+ *
13087
+ * A contribution is a discriminated union on `kind`:
13088
+ *
13089
+ * - `redirect` — a declarative button. The login page renders a generic
13090
+ * button that navigates to `startUrl` (an addon-owned HTTP route).
13091
+ * Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
13092
+ * ZERO shell-side JS. A future SSO addon plugs in the same way — the
13093
+ * login page needs NO change.
13094
+ *
13095
+ * - `widget` — a Module-Federation widget the login page mounts (via
13096
+ * `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
13097
+ * login ceremony, which must run `@simplewebauthn/browser` INSIDE the
13098
+ * addon bundle. The referenced widget also declares `preAuth: true` in
13099
+ * its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
13100
+ * stamps a public `bundleUrl` from `addonId` + `bundle`.
13101
+ *
13102
+ * Every contribution carries a `stage`:
13103
+ * - `primary` — shown on the first credentials screen (OIDC /
13104
+ * magic-link buttons; a future usernameless passkey).
13105
+ * - `second-factor` — shown AFTER the password leg, gated on the
13106
+ * returned `factors` (passkey-as-2FA today).
13107
+ *
13108
+ * `mount: skip` — the cap is read server-side by the core auth router
13109
+ * (`registry.getCollection('login-method')`), never mounted as its own
13110
+ * tRPC router.
13111
+ */
13112
+ /** When a login method renders in the two-phase login flow. */
13113
+ var LoginStageEnum = _enum(["primary", "second-factor"]);
13114
+ /** One login-method contribution — redirect button OR pre-auth widget. */
13115
+ var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
13116
+ kind: literal("redirect"),
13117
+ /** Stable id within the login-method set (e.g. `auth-oidc/google`). */
13118
+ id: string(),
13119
+ /** Operator-facing button label. */
13120
+ label: string(),
13121
+ /** lucide-react icon name. */
13122
+ icon: string().optional(),
13123
+ /** Addon-owned HTTP route the button navigates to (GET). */
13124
+ startUrl: string(),
13125
+ stage: LoginStageEnum
13126
+ }), object({
13127
+ kind: literal("widget"),
13128
+ /** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
13129
+ id: string(),
13130
+ /** Owning addon id — drives the public bundle URL + the MF namespace. */
13131
+ addonId: string(),
13132
+ /** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
13133
+ bundle: string(),
13134
+ /** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
13135
+ remote: WidgetRemoteSchema,
13136
+ stage: LoginStageEnum
13137
+ })]);
13138
+ method(_void(), array(LoginMethodContributionSchema).readonly());
13139
+ /**
12952
13140
  * Orchestrator-side destination metadata. The orchestrator computes
12953
13141
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12954
13142
  * (admin UI, restore flow) see one canonical key.
@@ -15305,11 +15493,11 @@ var pipelineAnalyticsCapability = {
15305
15493
  }
15306
15494
  };
15307
15495
  var CameraPipelineConfigSchema = object({
15308
- engine: PipelineEngineChoiceSchema,
15496
+ engine: PipelineEngineChoiceSchema.optional(),
15309
15497
  steps: array(PipelineStepInputSchema).readonly(),
15310
15498
  audio: object({
15311
- engine: PipelineEngineChoiceSchema,
15312
- modelId: string(),
15499
+ engine: PipelineEngineChoiceSchema.optional(),
15500
+ modelId: string().optional(),
15313
15501
  enabled: boolean(),
15314
15502
  settings: record(string(), unknown()).readonly().optional()
15315
15503
  }).nullable().optional()
@@ -15324,7 +15512,7 @@ var PipelineTemplateSchema = object({
15324
15512
  });
15325
15513
  var AgentAddonConfigSchema = object({
15326
15514
  enabled: boolean(),
15327
- modelId: string(),
15515
+ modelId: string().optional(),
15328
15516
  settings: record(string(), unknown()).readonly()
15329
15517
  });
15330
15518
  var AgentPipelineSettingsSchema = object({
@@ -15334,12 +15522,25 @@ var AgentPipelineSettingsSchema = object({
15334
15522
  detectWeight: number().positive().optional(),
15335
15523
  /** Node is eligible to run the detection pipeline (decode + inference). */
15336
15524
  detect: boolean().optional(),
15337
- /** Node is eligible to host decoder sessions. */
15525
+ /**
15526
+ * DEPRECATED AND IGNORED. Decode is always co-located with its frame
15527
+ * consumer, so decode eligibility IS detect eligibility. Kept optional in
15528
+ * the schema ONLY so persisted stores written before the removal still
15529
+ * parse — no code reads it and no write path emits it.
15530
+ */
15338
15531
  decode: boolean().optional(),
15339
15532
  /** Node is eligible to run audio-analyzer sessions. */
15340
15533
  audio: boolean().optional(),
15341
15534
  /** Node is eligible to be the ingest / source-owner (serve the restream). */
15342
- ingest: boolean().optional()
15535
+ ingest: boolean().optional(),
15536
+ /**
15537
+ * Operator override for the LAN host a cross-node decoder dials to reach
15538
+ * THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
15539
+ * falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
15540
+ * it already uses to reach the hub). Set this only when the auto-detected
15541
+ * address is wrong (multi-homed host, NAT, custom interface).
15542
+ */
15543
+ reachableHost: string().optional()
15343
15544
  });
15344
15545
  var CameraPipelineForAgentSchema = object({
15345
15546
  steps: array(PipelineStepInputSchema).readonly(),
@@ -15387,25 +15588,6 @@ var PipelineAssignmentSchema = object({
15387
15588
  assignedAt: number()
15388
15589
  });
15389
15590
  /**
15390
- * Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
15391
- * the decoder-node placement domain (`balanceDecoder` decision: manual pin
15392
- * → co-located with pipeline → capacity).
15393
- */
15394
- var DecoderAssignmentSchema = object({
15395
- deviceId: number(),
15396
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
15397
- decoderNodeId: string(),
15398
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
15399
- pinned: boolean(),
15400
- /** Why this assignment was made — useful for debugging the decoder balancer. */
15401
- reason: _enum([
15402
- "manual",
15403
- "co-located",
15404
- "capacity",
15405
- "hardware-affinity"
15406
- ])
15407
- });
15408
- /**
15409
15591
  * Per-agent load summary surfaced to the load balancer + dashboards.
15410
15592
  * Aggregated from each runner's `getLocalLoad` cap call.
15411
15593
  */
@@ -15445,6 +15627,15 @@ var GlobalMetricsSchema = object({
15445
15627
  * capability providers.
15446
15628
  */
15447
15629
  var CapabilityBindingsSchema = record(string(), string());
15630
+ /**
15631
+ * The cluster's single camera-source owner (`clusterRoles.ingestNode`) plus
15632
+ * its LAN-reachable host, if one is registered. See `getIngestOwner`.
15633
+ */
15634
+ var IngestOwnerSchema = object({
15635
+ ownerNodeId: string(),
15636
+ reachableHost: string().optional(),
15637
+ configIssue: string().optional()
15638
+ });
15448
15639
  /** Source block — always present; derives from the stream catalog. */
15449
15640
  var CameraSourceStatusSchema = object({ streams: array(object({
15450
15641
  camStreamId: string(),
@@ -15459,6 +15650,14 @@ var CameraAssignmentStatusSchema = object({
15459
15650
  detectionNodeId: string().nullable(),
15460
15651
  decoderNodeId: string().nullable(),
15461
15652
  audioNodeId: string().nullable(),
15653
+ /**
15654
+ * The node that OWNS this camera's physical source pull (dials the RTSP and
15655
+ * hosts the broker/restream) — the cluster ingest owner today
15656
+ * (`clusterRoles.ingestNode`), per-camera once source assignment lands. Lets
15657
+ * the UI show WHERE a camera is sourced without SSH/logs, and is the node the
15658
+ * broker block below was read from (pinned). Nullable only pre-wiring.
15659
+ */
15660
+ sourceNodeId: string().nullable(),
15462
15661
  pinned: object({
15463
15662
  detection: boolean(),
15464
15663
  decoder: boolean(),
@@ -15591,16 +15790,7 @@ method(object({
15591
15790
  }), object({ success: literal(true) }), {
15592
15791
  kind: "mutation",
15593
15792
  auth: "admin"
15594
- }), method(object({
15595
- deviceId: number(),
15596
- nodeId: string()
15597
- }), _void(), {
15598
- kind: "mutation",
15599
- auth: "admin"
15600
- }), method(object({ deviceId: number() }), _void(), {
15601
- kind: "mutation",
15602
- auth: "admin"
15603
- }), method(_void(), array(DecoderAssignmentSchema).readonly()), method(object({
15793
+ }), method(_void(), IngestOwnerSchema), method(object({
15604
15794
  deviceId: number(),
15605
15795
  nodeId: string()
15606
15796
  }), object({ success: literal(true) }), {
@@ -15621,10 +15811,7 @@ method(object({
15621
15811
  nodeId: string(),
15622
15812
  pinned: boolean(),
15623
15813
  assignedAt: number()
15624
- }))), method(object({
15625
- deviceId: number(),
15626
- pipelineNodeId: string().optional()
15627
- }), DecoderAssignmentSchema), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
15814
+ }))), method(object({ agentNodeId: string() }), AgentPipelineSettingsSchema.nullable()), method(_void(), array(object({
15628
15815
  nodeId: string(),
15629
15816
  settings: AgentPipelineSettingsSchema
15630
15817
  })).readonly()), method(object({
@@ -15654,12 +15841,26 @@ method(object({
15654
15841
  }), method(object({
15655
15842
  agentNodeId: string(),
15656
15843
  detect: boolean().nullable().optional(),
15657
- decode: boolean().nullable().optional(),
15658
15844
  audio: boolean().nullable().optional(),
15659
15845
  ingest: boolean().nullable().optional()
15660
15846
  }), object({ success: literal(true) }), {
15661
15847
  kind: "mutation",
15662
15848
  auth: "admin"
15849
+ }), method(object({
15850
+ agentNodeId: string(),
15851
+ reachableHost: string().nullable()
15852
+ }), object({ success: literal(true) }), {
15853
+ kind: "mutation",
15854
+ auth: "admin"
15855
+ }), method(object({ agentNodeId: string() }), object({
15856
+ success: literal(true),
15857
+ /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
15858
+ effectiveModelId: string().nullable(),
15859
+ /** Number of cameras whose node-scoped overrides were cleared. */
15860
+ clearedCameraOverrides: number()
15861
+ }), {
15862
+ kind: "mutation",
15863
+ auth: "admin"
15663
15864
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
15664
15865
  deviceId: number(),
15665
15866
  addonId: string(),
@@ -15704,22 +15905,131 @@ method(object({
15704
15905
  kind: "mutation",
15705
15906
  auth: "admin"
15706
15907
  });
15707
- var RegisteredStreamSchema = object({
15708
- streamId: string(),
15709
- label: string().optional(),
15710
- codec: string(),
15711
- type: _enum(["video", "audio"]),
15712
- sourceUrl: string()
15908
+ /**
15909
+ * server-management — per-NODE singleton capability for a node's ROOT
15910
+ * package lifecycle (runtime-updatable node packages, phase 2: hub + docker
15911
+ * agents).
15912
+ *
15913
+ * Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
15914
+ * on agents) carries the whole software stack in its npm dep tree, so ONE
15915
+ * version describes the node. Updates install into
15916
+ * `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
15917
+ * starter (probation boot + auto-rollback to N-1).
15918
+ *
15919
+ * Providers:
15920
+ * - HUB: `ServerUpdateService` behind the `server-provided` mount
15921
+ * (`buildServerProviders` in trpc.router.ts) — the default target for
15922
+ * unpinned calls.
15923
+ * - AGENT: `AgentUpdateService` registered by the agent bootstrap under
15924
+ * the synthetic `agent-runtime` addonId and declared in the agent's
15925
+ * `$hub.registerNode` manifest.
15926
+ *
15927
+ * Node routing: singleton caps get the codegen/runtime-builder `nodeId`
15928
+ * injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
15929
+ * SDK) routes the call to that node's provider via the standard remote
15930
+ * proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
15931
+ * in-process provider lookup). No `nodeId` → the hub's own provider.
15932
+ *
15933
+ * Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
15934
+ */
15935
+ /**
15936
+ * Where the running hub's code was loaded from:
15937
+ * - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
15938
+ * plain resolution and runtime updates are refused.
15939
+ * - `baked` — the immutable image seed closure (no data-dir root active).
15940
+ * - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
15941
+ */
15942
+ var ServerBootModeSchema = _enum([
15943
+ "workspace",
15944
+ "baked",
15945
+ "data-root"
15946
+ ]);
15947
+ /**
15948
+ * Update lifecycle state:
15949
+ * - `idle` / `checking` / `staging` — steady / in-flight registry work.
15950
+ * - `pending-restart` — a version is staged and the node has NOT yet
15951
+ * restarted onto it (still running the OLD version).
15952
+ * - `awaiting-confirmation` — the node HAS restarted onto the staged version
15953
+ * (it is the active probation boot) and is waiting to confirm boot-health.
15954
+ * Apply/rollback are refused in this state and the node must NOT be
15955
+ * manually restarted, or the probation boot auto-rolls-back.
15956
+ */
15957
+ var ServerUpdateStateSchema = _enum([
15958
+ "idle",
15959
+ "checking",
15960
+ "staging",
15961
+ "pending-restart",
15962
+ "awaiting-confirmation"
15963
+ ]);
15964
+ var ServerRollbackInfoSchema = object({
15965
+ /** The version that failed (or was manually rolled back). */
15966
+ fromVersion: string(),
15967
+ /** The version rolled back to; null = the baked seed. */
15968
+ toVersion: string().nullable(),
15969
+ atMs: number(),
15970
+ reason: string()
15713
15971
  });
15714
- var ExposedResourceSchema = object({
15715
- streamId: string(),
15716
- format: string(),
15717
- value: string()
15972
+ var ServerPackageStatusSchema = object({
15973
+ /** Root package name (`@camstack/server` on the hub). */
15974
+ packageName: string(),
15975
+ /** Version of the code the running process ACTUALLY loaded. */
15976
+ runningVersion: string().nullable(),
15977
+ /** Node.js runtime version the node's process runs on (`process.versions.node`). */
15978
+ nodeRuntimeVersion: string().nullable(),
15979
+ /** Active data-dir root version; null when booted from seed/workspace. */
15980
+ activeVersion: string().nullable(),
15981
+ /** N-1 version kept for rollback; null when no previous version exists. */
15982
+ previousVersion: string().nullable(),
15983
+ /** Version of the immutable baked seed closure (image fallback). */
15984
+ seedVersion: string().nullable(),
15985
+ /** Latest registry version from the most recent check (null = never checked). */
15986
+ latestVersion: string().nullable(),
15987
+ updateAvailable: boolean(),
15988
+ bootMode: ServerBootModeSchema,
15989
+ updateState: ServerUpdateStateSchema,
15990
+ /** Version staged + awaiting its probation boot, when one is pending. */
15991
+ pendingVersion: string().nullable(),
15992
+ /** Set when the last freshly-activated version failed its boot health-check. */
15993
+ rolledBack: ServerRollbackInfoSchema.nullable(),
15994
+ /**
15995
+ * True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
15996
+ * hub is running from the baked seed (or workspace) while installed data-dir
15997
+ * versions are being IGNORED. Surfaced as a warning in the UI.
15998
+ */
15999
+ stateFileCorrupt: boolean(),
16000
+ lastCheckedAtMs: number().nullable()
16001
+ });
16002
+ var ServerUpdateCheckResultSchema = object({
16003
+ packageName: string(),
16004
+ runningVersion: string().nullable(),
16005
+ latestVersion: string().nullable(),
16006
+ updateAvailable: boolean(),
16007
+ checkedAtMs: number(),
16008
+ /** Non-null when the registry lookup failed (offline, bad registry, …). */
16009
+ error: string().nullable()
16010
+ });
16011
+ var ServerUpdateActionResultSchema = object({
16012
+ accepted: boolean(),
16013
+ targetVersion: string().nullable(),
16014
+ /** True when a graceful restart was scheduled to apply the change. */
16015
+ restarting: boolean(),
16016
+ message: string()
16017
+ });
16018
+ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
16019
+ kind: "mutation",
16020
+ auth: "admin"
16021
+ }), method(object({
16022
+ /** Explicit target version; omitted = latest from the registry. */
16023
+ version: string().optional() }), ServerUpdateActionResultSchema, {
16024
+ kind: "mutation",
16025
+ auth: "admin"
16026
+ }), method(_void(), ServerUpdateActionResultSchema, {
16027
+ kind: "mutation",
16028
+ auth: "admin"
16029
+ }), method(_void(), ServerUpdateActionResultSchema, {
16030
+ kind: "mutation",
16031
+ auth: "admin"
15718
16032
  });
15719
- method(object({
15720
- deviceId: number(),
15721
- streams: array(RegisteredStreamSchema).readonly()
15722
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(ExposedResourceSchema).readonly());
15723
16033
  /**
15724
16034
  * Query filter for settings-store collections.
15725
16035
  */
@@ -15872,9 +16182,9 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
15872
16182
  /**
15873
16183
  * A single device snapshot returned as base64 JPEG/PNG.
15874
16184
  *
15875
- * Shared with the `snapshot-provider` collection cap the orchestrator
15876
- * receives the same shape from each native provider and from the
15877
- * broker-based fallback.
16185
+ * The `SnapshotAddon` wrapper returns this shape whether the frame came from
16186
+ * the device-native provider (onboard capture) or from the stream-broker
16187
+ * prebuffer fallback.
15878
16188
  */
15879
16189
  var SnapshotImageSchema = object({
15880
16190
  base64: string(),
@@ -15905,11 +16215,12 @@ DeviceType.Camera, method(object({
15905
16215
  }), SnapshotImageSchema.nullable()), method(object({ deviceId: number() }), _void(), {
15906
16216
  kind: "mutation",
15907
16217
  auth: "admin"
15908
- });
15909
- method(object({ deviceId: number() }), boolean()), method(object({
16218
+ }), systemMethod(object({ deviceIds: array(number()).min(1).max(200) }), array(object({
15910
16219
  deviceId: number(),
15911
- streamId: string().optional()
15912
- }), SnapshotImageSchema.nullable());
16220
+ lastCapturedAt: number().nullable(),
16221
+ cacheAgeMs: number().nullable(),
16222
+ etag: string().nullable()
16223
+ })));
15913
16224
  /**
15914
16225
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
15915
16226
  * providers (OIDC, SAML, magic-link, …) mint an HMAC-signed token
@@ -16160,10 +16471,32 @@ method(_void(), array(TurnServerSchema).readonly());
16160
16471
  * b. `finishAuthentication({userId, response})` → server verifies
16161
16472
  * the assertion, bumps the credential counter, returns ok.
16162
16473
  *
16474
+ * 2b. Usernameless (discoverable-credential) authentication — the
16475
+ * passkey IS the primary factor, no password leg:
16476
+ * a. `beginDiscoverableAuthentication({})` → assertion options with
16477
+ * EMPTY `allowCredentials` (the browser offers every resident
16478
+ * passkey it holds for this RP) + `userVerification: 'required'`
16479
+ * (the passkey replaces both factors, so UV is mandatory).
16480
+ * The challenge is stored server-side, NOT bound to any user.
16481
+ * b. `finishDiscoverableAuthentication({response})` → the provider
16482
+ * resolves the credential by the response's credential id,
16483
+ * verifies the assertion against the stored challenge + that
16484
+ * credential's public key/counter, and returns the OWNING
16485
+ * `userId` — the caller (core auth router) mints the session.
16486
+ *
16163
16487
  * 3. Management:
16164
16488
  * - `listPasskeys({userId})` — enumerate user's enrolled credentials.
16165
16489
  * - `removePasskey({userId, credentialId})` — revoke one credential.
16166
16490
  *
16491
+ * 4. Second-factor preference (opt-in, default OFF):
16492
+ * Enrolling a passkey only enables passkey-FIRST sign-in. It is
16493
+ * demanded as a second factor after a password login ONLY when the
16494
+ * user explicitly opts in via `setSecondFactorPreference`.
16495
+ * - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
16496
+ * row ⇒ `enabled: false`).
16497
+ * - `setSecondFactorPreference({userId, enabled})` — persisted by
16498
+ * the providing addon beside its credentials.
16499
+ *
16167
16500
  * Challenges are short-lived (5 min, in-memory). The cap is internal —
16168
16501
  * the admin-ui composes the begin/finish round-trip and never exposes
16169
16502
  * the cap to non-admins.
@@ -16206,6 +16539,17 @@ method(object({
16206
16539
  }), object({ verified: boolean() }), {
16207
16540
  kind: "mutation",
16208
16541
  access: "view"
16542
+ }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
16543
+ kind: "mutation",
16544
+ access: "view"
16545
+ }), method(object({
16546
+ /** AuthenticationResponseJSON from the browser. */
16547
+ response: record(string(), unknown()) }), object({
16548
+ verified: boolean(),
16549
+ userId: string().nullable()
16550
+ }), {
16551
+ kind: "mutation",
16552
+ access: "view"
16209
16553
  }), method(object({ userId: string() }), array(PasskeySummarySchema), { auth: "admin" }), method(object({
16210
16554
  userId: string(),
16211
16555
  credentialId: string()
@@ -16213,6 +16557,13 @@ method(object({
16213
16557
  kind: "mutation",
16214
16558
  auth: "admin",
16215
16559
  access: "delete"
16560
+ }), method(object({ userId: string() }), object({ enabled: boolean() }), { auth: "admin" }), method(object({
16561
+ userId: string(),
16562
+ enabled: boolean()
16563
+ }), object({ success: literal(true) }), {
16564
+ kind: "mutation",
16565
+ auth: "admin",
16566
+ access: "create"
16216
16567
  });
16217
16568
  /**
16218
16569
  * `videoclips` — the unified, navigable-clip surface for a camera.
@@ -16280,9 +16631,10 @@ var videoclipsCapability = {
16280
16631
  }
16281
16632
  };
16282
16633
  /**
16283
- * Optional client-side hints sent at session creation to help the
16284
- * provider pick the best native source. All fields are optional —
16285
- * a viewer that knows nothing still gets a sane default.
16634
+ * Optional client-side hints sent at session creation to help the provider
16635
+ * pick the best native source. All fields optional — a viewer that knows
16636
+ * nothing still gets a sane default. (Relocated from the retired `webrtc`
16637
+ * collection cap; this `webrtc-session` cap is the live signaling surface.)
16286
16638
  */
16287
16639
  var webrtcClientHintsSchema = object({
16288
16640
  viewportWidth: number().int().positive().optional(),
@@ -16293,22 +16645,6 @@ var webrtcClientHintsSchema = object({
16293
16645
  /** Hard tier override; takes precedence over scoring when registered. */
16294
16646
  prefersTier: string().optional()
16295
16647
  }).partial();
16296
- method(object({
16297
- streamId: string(),
16298
- sdpOffer: string()
16299
- }), string(), { kind: "mutation" }), method(object({ streamId: string() }), boolean()), method(object({
16300
- streamId: string(),
16301
- codec: string()
16302
- }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), _void(), { kind: "mutation" }), method(object({
16303
- streamId: string(),
16304
- hints: webrtcClientHintsSchema.optional()
16305
- }), object({
16306
- sessionId: string(),
16307
- sdpOffer: string()
16308
- }), { kind: "mutation" }), method(object({
16309
- sessionId: string(),
16310
- sdpAnswer: string()
16311
- }), _void(), { kind: "mutation" }), method(object({ sessionId: string() }), _void(), { kind: "mutation" }), method(object({ streamId: string() }), boolean());
16312
16648
  /**
16313
16649
  * Discriminated target for a WebRTC session. The client sends this
16314
16650
  * structured object instead of building / parsing brokerId strings;
@@ -17762,6 +18098,16 @@ var TopologyCategorySchema = object({
17762
18098
  healthy: number(),
17763
18099
  addons: array(TopologyCategoryAddonSchema).readonly()
17764
18100
  });
18101
+ /**
18102
+ * The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
18103
+ * `@camstack/agent` on agents) as reported by its `registerNode` manifest —
18104
+ * version visibility for the Server management surface. Nullable: offline
18105
+ * rows and pre-phase-2 nodes report none.
18106
+ */
18107
+ var TopologyRootPackageSchema = object({
18108
+ name: string(),
18109
+ version: string()
18110
+ });
17765
18111
  var TopologyNodeSchema = object({
17766
18112
  id: string(),
17767
18113
  name: string(),
@@ -17785,7 +18131,8 @@ var TopologyNodeSchema = object({
17785
18131
  status: string()
17786
18132
  })).readonly(),
17787
18133
  processes: array(TopologyProcessSchema).readonly(),
17788
- categories: array(TopologyCategorySchema).readonly()
18134
+ categories: array(TopologyCategorySchema).readonly(),
18135
+ rootPackage: TopologyRootPackageSchema.nullable()
17789
18136
  });
17790
18137
  var CapUsageEdgeSchema = object({
17791
18138
  callerAddonId: string(),
@@ -20609,6 +20956,12 @@ Object.freeze({
20609
20956
  addonId: null,
20610
20957
  access: "create"
20611
20958
  },
20959
+ "loginMethod.getLoginMethods": {
20960
+ capName: "login-method",
20961
+ capScope: "system",
20962
+ addonId: null,
20963
+ access: "view"
20964
+ },
20612
20965
  "mediaPlayer.next": {
20613
20966
  capName: "media-player",
20614
20967
  capScope: "device",
@@ -21239,23 +21592,23 @@ Object.freeze({
21239
21592
  addonId: null,
21240
21593
  access: "create"
21241
21594
  },
21242
- "pipelineExecutor.deleteModel": {
21595
+ "pipelineExecutor.clearDeviceOverrides": {
21243
21596
  capName: "pipeline-executor",
21244
21597
  capScope: "system",
21245
21598
  addonId: null,
21246
21599
  access: "delete"
21247
21600
  },
21248
- "pipelineExecutor.deleteTemplate": {
21601
+ "pipelineExecutor.deleteModel": {
21249
21602
  capName: "pipeline-executor",
21250
21603
  capScope: "system",
21251
21604
  addonId: null,
21252
21605
  access: "delete"
21253
21606
  },
21254
- "pipelineExecutor.detect": {
21607
+ "pipelineExecutor.deleteTemplate": {
21255
21608
  capName: "pipeline-executor",
21256
21609
  capScope: "system",
21257
21610
  addonId: null,
21258
- access: "view"
21611
+ access: "delete"
21259
21612
  },
21260
21613
  "pipelineExecutor.downloadModel": {
21261
21614
  capName: "pipeline-executor",
@@ -21449,13 +21802,13 @@ Object.freeze({
21449
21802
  addonId: null,
21450
21803
  access: "create"
21451
21804
  },
21452
- "pipelineOrchestrator.assignAudio": {
21453
- capName: "pipeline-orchestrator",
21805
+ "pipelineExecutor.validatePipeline": {
21806
+ capName: "pipeline-executor",
21454
21807
  capScope: "system",
21455
21808
  addonId: null,
21456
- access: "create"
21809
+ access: "view"
21457
21810
  },
21458
- "pipelineOrchestrator.assignDecoder": {
21811
+ "pipelineOrchestrator.assignAudio": {
21459
21812
  capName: "pipeline-orchestrator",
21460
21813
  capScope: "system",
21461
21814
  addonId: null,
@@ -21539,19 +21892,13 @@ Object.freeze({
21539
21892
  addonId: null,
21540
21893
  access: "view"
21541
21894
  },
21542
- "pipelineOrchestrator.getDecoderAssignment": {
21543
- capName: "pipeline-orchestrator",
21544
- capScope: "system",
21545
- addonId: null,
21546
- access: "view"
21547
- },
21548
- "pipelineOrchestrator.getDecoderAssignments": {
21895
+ "pipelineOrchestrator.getGlobalMetrics": {
21549
21896
  capName: "pipeline-orchestrator",
21550
21897
  capScope: "system",
21551
21898
  addonId: null,
21552
21899
  access: "view"
21553
21900
  },
21554
- "pipelineOrchestrator.getGlobalMetrics": {
21901
+ "pipelineOrchestrator.getIngestOwner": {
21555
21902
  capName: "pipeline-orchestrator",
21556
21903
  capScope: "system",
21557
21904
  addonId: null,
@@ -21593,6 +21940,12 @@ Object.freeze({
21593
21940
  addonId: null,
21594
21941
  access: "delete"
21595
21942
  },
21943
+ "pipelineOrchestrator.resetNodePipelineDefaults": {
21944
+ capName: "pipeline-orchestrator",
21945
+ capScope: "system",
21946
+ addonId: null,
21947
+ access: "delete"
21948
+ },
21596
21949
  "pipelineOrchestrator.resolvePipeline": {
21597
21950
  capName: "pipeline-orchestrator",
21598
21951
  capScope: "system",
@@ -21629,37 +21982,37 @@ Object.freeze({
21629
21982
  addonId: null,
21630
21983
  access: "create"
21631
21984
  },
21632
- "pipelineOrchestrator.setCameraPipelineForAgent": {
21985
+ "pipelineOrchestrator.setAgentReachableHost": {
21633
21986
  capName: "pipeline-orchestrator",
21634
21987
  capScope: "system",
21635
21988
  addonId: null,
21636
21989
  access: "create"
21637
21990
  },
21638
- "pipelineOrchestrator.setCameraStepOverride": {
21991
+ "pipelineOrchestrator.setCameraPipelineForAgent": {
21639
21992
  capName: "pipeline-orchestrator",
21640
21993
  capScope: "system",
21641
21994
  addonId: null,
21642
21995
  access: "create"
21643
21996
  },
21644
- "pipelineOrchestrator.setCameraStepToggle": {
21997
+ "pipelineOrchestrator.setCameraStepOverride": {
21645
21998
  capName: "pipeline-orchestrator",
21646
21999
  capScope: "system",
21647
22000
  addonId: null,
21648
22001
  access: "create"
21649
22002
  },
21650
- "pipelineOrchestrator.setCapabilityBinding": {
22003
+ "pipelineOrchestrator.setCameraStepToggle": {
21651
22004
  capName: "pipeline-orchestrator",
21652
22005
  capScope: "system",
21653
22006
  addonId: null,
21654
22007
  access: "create"
21655
22008
  },
21656
- "pipelineOrchestrator.unassignAudio": {
22009
+ "pipelineOrchestrator.setCapabilityBinding": {
21657
22010
  capName: "pipeline-orchestrator",
21658
22011
  capScope: "system",
21659
22012
  addonId: null,
21660
22013
  access: "create"
21661
22014
  },
21662
- "pipelineOrchestrator.unassignDecoder": {
22015
+ "pipelineOrchestrator.unassignAudio": {
21663
22016
  capName: "pipeline-orchestrator",
21664
22017
  capScope: "system",
21665
22018
  addonId: null,
@@ -21959,33 +22312,45 @@ Object.freeze({
21959
22312
  addonId: null,
21960
22313
  access: "create"
21961
22314
  },
21962
- "restreamer.getExposedResources": {
21963
- capName: "restreamer",
22315
+ "scriptRunner.run": {
22316
+ capName: "script-runner",
22317
+ capScope: "device",
22318
+ addonId: null,
22319
+ access: "create"
22320
+ },
22321
+ "scriptRunner.stop": {
22322
+ capName: "script-runner",
22323
+ capScope: "device",
22324
+ addonId: null,
22325
+ access: "create"
22326
+ },
22327
+ "serverManagement.applyServerUpdate": {
22328
+ capName: "server-management",
21964
22329
  capScope: "system",
21965
22330
  addonId: null,
21966
- access: "view"
22331
+ access: "create"
21967
22332
  },
21968
- "restreamer.registerDevice": {
21969
- capName: "restreamer",
22333
+ "serverManagement.checkServerUpdate": {
22334
+ capName: "server-management",
21970
22335
  capScope: "system",
21971
22336
  addonId: null,
21972
22337
  access: "create"
21973
22338
  },
21974
- "restreamer.unregisterDevice": {
21975
- capName: "restreamer",
22339
+ "serverManagement.getServerPackageStatus": {
22340
+ capName: "server-management",
21976
22341
  capScope: "system",
21977
22342
  addonId: null,
21978
- access: "delete"
22343
+ access: "view"
21979
22344
  },
21980
- "scriptRunner.run": {
21981
- capName: "script-runner",
21982
- capScope: "device",
22345
+ "serverManagement.restartServer": {
22346
+ capName: "server-management",
22347
+ capScope: "system",
21983
22348
  addonId: null,
21984
22349
  access: "create"
21985
22350
  },
21986
- "scriptRunner.stop": {
21987
- capName: "script-runner",
21988
- capScope: "device",
22351
+ "serverManagement.rollbackServerUpdate": {
22352
+ capName: "server-management",
22353
+ capScope: "system",
21989
22354
  addonId: null,
21990
22355
  access: "create"
21991
22356
  },
@@ -22073,23 +22438,17 @@ Object.freeze({
22073
22438
  addonId: null,
22074
22439
  access: "view"
22075
22440
  },
22076
- "snapshot.invalidateCache": {
22441
+ "snapshot.getSnapshotOverview": {
22077
22442
  capName: "snapshot",
22078
22443
  capScope: "device",
22079
22444
  addonId: null,
22080
- access: "create"
22081
- },
22082
- "snapshotProvider.getSnapshot": {
22083
- capName: "snapshot-provider",
22084
- capScope: "system",
22085
- addonId: null,
22086
22445
  access: "view"
22087
22446
  },
22088
- "snapshotProvider.supportsDevice": {
22089
- capName: "snapshot-provider",
22090
- capScope: "system",
22447
+ "snapshot.invalidateCache": {
22448
+ capName: "snapshot",
22449
+ capScope: "device",
22091
22450
  addonId: null,
22092
- access: "view"
22451
+ access: "create"
22093
22452
  },
22094
22453
  "ssoBridge.signBridgeToken": {
22095
22454
  capName: "sso-bridge",
@@ -22517,30 +22876,6 @@ Object.freeze({
22517
22876
  addonId: null,
22518
22877
  access: "view"
22519
22878
  },
22520
- "streamingEngine.getStreamUrl": {
22521
- capName: "streaming-engine",
22522
- capScope: "system",
22523
- addonId: null,
22524
- access: "view"
22525
- },
22526
- "streamingEngine.listStreams": {
22527
- capName: "streaming-engine",
22528
- capScope: "system",
22529
- addonId: null,
22530
- access: "view"
22531
- },
22532
- "streamingEngine.registerStream": {
22533
- capName: "streaming-engine",
22534
- capScope: "system",
22535
- addonId: null,
22536
- access: "create"
22537
- },
22538
- "streamingEngine.unregisterStream": {
22539
- capName: "streaming-engine",
22540
- capScope: "system",
22541
- addonId: null,
22542
- access: "delete"
22543
- },
22544
22879
  "streamParams.getConfigSchema": {
22545
22880
  capName: "stream-params",
22546
22881
  capScope: "device",
@@ -22787,6 +23122,12 @@ Object.freeze({
22787
23122
  addonId: null,
22788
23123
  access: "view"
22789
23124
  },
23125
+ "userPasskeys.beginDiscoverableAuthentication": {
23126
+ capName: "user-passkeys",
23127
+ capScope: "system",
23128
+ addonId: null,
23129
+ access: "view"
23130
+ },
22790
23131
  "userPasskeys.beginRegistration": {
22791
23132
  capName: "user-passkeys",
22792
23133
  capScope: "system",
@@ -22799,12 +23140,24 @@ Object.freeze({
22799
23140
  addonId: null,
22800
23141
  access: "view"
22801
23142
  },
23143
+ "userPasskeys.finishDiscoverableAuthentication": {
23144
+ capName: "user-passkeys",
23145
+ capScope: "system",
23146
+ addonId: null,
23147
+ access: "view"
23148
+ },
22802
23149
  "userPasskeys.finishRegistration": {
22803
23150
  capName: "user-passkeys",
22804
23151
  capScope: "system",
22805
23152
  addonId: null,
22806
23153
  access: "create"
22807
23154
  },
23155
+ "userPasskeys.getSecondFactorPreference": {
23156
+ capName: "user-passkeys",
23157
+ capScope: "system",
23158
+ addonId: null,
23159
+ access: "view"
23160
+ },
22808
23161
  "userPasskeys.listPasskeys": {
22809
23162
  capName: "user-passkeys",
22810
23163
  capScope: "system",
@@ -22817,6 +23170,12 @@ Object.freeze({
22817
23170
  addonId: null,
22818
23171
  access: "delete"
22819
23172
  },
23173
+ "userPasskeys.setSecondFactorPreference": {
23174
+ capName: "user-passkeys",
23175
+ capScope: "system",
23176
+ addonId: null,
23177
+ access: "create"
23178
+ },
22820
23179
  "vacuumControl.locate": {
22821
23180
  capName: "vacuum-control",
22822
23181
  capScope: "device",
@@ -22889,6 +23248,18 @@ Object.freeze({
22889
23248
  addonId: null,
22890
23249
  access: "view"
22891
23250
  },
23251
+ "viewerUi.getStaticDir": {
23252
+ capName: "viewer-ui",
23253
+ capScope: "system",
23254
+ addonId: null,
23255
+ access: "view"
23256
+ },
23257
+ "viewerUi.getVersion": {
23258
+ capName: "viewer-ui",
23259
+ capScope: "system",
23260
+ addonId: null,
23261
+ access: "view"
23262
+ },
22892
23263
  "waterHeater.setAway": {
22893
23264
  capName: "water-heater",
22894
23265
  capScope: "device",
@@ -22907,54 +23278,6 @@ Object.freeze({
22907
23278
  addonId: null,
22908
23279
  access: "create"
22909
23280
  },
22910
- "webrtc.closeSession": {
22911
- capName: "webrtc",
22912
- capScope: "system",
22913
- addonId: null,
22914
- access: "create"
22915
- },
22916
- "webrtc.createSession": {
22917
- capName: "webrtc",
22918
- capScope: "system",
22919
- addonId: null,
22920
- access: "create"
22921
- },
22922
- "webrtc.handleAnswer": {
22923
- capName: "webrtc",
22924
- capScope: "system",
22925
- addonId: null,
22926
- access: "create"
22927
- },
22928
- "webrtc.handleOffer": {
22929
- capName: "webrtc",
22930
- capScope: "system",
22931
- addonId: null,
22932
- access: "create"
22933
- },
22934
- "webrtc.hasAdaptiveBitrate": {
22935
- capName: "webrtc",
22936
- capScope: "system",
22937
- addonId: null,
22938
- access: "view"
22939
- },
22940
- "webrtc.registerStream": {
22941
- capName: "webrtc",
22942
- capScope: "system",
22943
- addonId: null,
22944
- access: "create"
22945
- },
22946
- "webrtc.supportsStream": {
22947
- capName: "webrtc",
22948
- capScope: "system",
22949
- addonId: null,
22950
- access: "view"
22951
- },
22952
- "webrtc.unregisterStream": {
22953
- capName: "webrtc",
22954
- capScope: "system",
22955
- addonId: null,
22956
- access: "delete"
22957
- },
22958
23281
  "webrtcSession.addIceCandidate": {
22959
23282
  capName: "webrtc-session",
22960
23283
  capScope: "device",