@camstack/addon-pipeline-orchestrator 1.2.661 → 1.2.663

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 (18) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/assets/viewer/.viewer-current-files.json +2 -2
  3. package/assets/viewer/.viewer-version +1 -1
  4. package/assets/viewer/_expo/static/js/web/{__common-b582199d5704981fa512087e41f144bb.js → __common-944a1711775677f5c7cba328efbb7eb2.js} +9 -9
  5. package/assets/viewer/_expo/static/js/web/{index-49b436680a10d5eb314daaefff7128b9.js → index-c2e4074d6805fc38a186dd83bd4fd0a2.js} +2 -2
  6. package/assets/viewer/index.html +1 -1
  7. package/dist/_stub.js +2 -2
  8. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-DL1arE-Y.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CbbVC-1B.mjs} +2 -2
  9. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-r0TW-BbW.mjs +26 -0
  10. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DkP-6xmg.mjs +26 -0
  11. package/dist/{hostInit-Z0lrM27L.mjs → hostInit-BQJRnhiE.mjs} +2 -2
  12. package/dist/index.js +597 -563
  13. package/dist/index.mjs +597 -563
  14. package/dist/remoteEntry.js +1 -1
  15. package/package.json +2 -2
  16. package/assets/viewer/_expo/static/js/web/_layout-0fda926e25f08a11cce3143894cd6667.js +0 -29
  17. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CmlOAYRv.mjs +0 -26
  18. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DGQuOA5w.mjs +0 -26
package/dist/index.js CHANGED
@@ -6012,7 +6012,7 @@ var ZodIssueCode = {
6012
6012
  var ZodFirstPartyTypeKind;
6013
6013
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6014
6014
  //#endregion
6015
- //#region ../types/dist/sleep-DEZaLbiu.mjs
6015
+ //#region ../types/dist/sleep-BX_MqzUe.mjs
6016
6016
  /**
6017
6017
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6018
6018
  * window to float samples (D455).
@@ -7608,6 +7608,28 @@ var SECRET_RETRY_MAX_MS = 5 * 6e4;
7608
7608
  /** Coalesces a burst of `keychain.changed` events into one re-resolve. */
7609
7609
  var SECRET_CHANGE_DEBOUNCE_MS = 250;
7610
7610
  /**
7611
+ * Pair a catalogue with the function that builds its ports FROM THE MIGRATION API. The one
7612
+ * place a catalogue is bound: a migration reaches nothing a ports binder cannot reach
7613
+ * through `api` (guard `check-migration-ports-surface`).
7614
+ */
7615
+ function migrationSet(catalogue, bindPorts) {
7616
+ return { bind: (api) => defineAddonMigrations(catalogue, bindPorts(api)) };
7617
+ }
7618
+ /** A mixed array is a mistake: the other kind would be dropped without a word. */
7619
+ function refuseMixed(form, kept, dropped) {
7620
+ if (dropped > 0) throw new Error(`runMigrations(${form}): ${dropped} of ${kept + dropped} entries are of the other kind and would be dropped; pass one kind per call`);
7621
+ }
7622
+ function catalogueOf(list) {
7623
+ const kept = list.filter((entry) => !("execute" in entry));
7624
+ refuseMixed("catalogue, (api) => ports", kept.length, list.length - kept.length);
7625
+ return kept;
7626
+ }
7627
+ function boundOf(list) {
7628
+ const kept = list.filter((entry) => "execute" in entry);
7629
+ refuseMixed("bound migrations", kept.length, list.length - kept.length);
7630
+ return kept;
7631
+ }
7632
+ /**
7611
7633
  * Base class for CamStack addons. Eliminates settings boilerplate:
7612
7634
  *
7613
7635
  * - Typed `config` property with automatic resolution from store + defaults
@@ -7774,23 +7796,21 @@ var BaseAddon = class {
7774
7796
  await this.loadScopedSchemas();
7775
7797
  return normalized;
7776
7798
  }
7799
+ async runMigrations(first, second, third) {
7800
+ if (typeof second === "function") return this.runMigrationSets([migrationSet(catalogueOf(first), second)], third);
7801
+ return this.runBound(boundOf(first), second);
7802
+ }
7777
7803
  /**
7778
- * Run this addon's migration catalogue (D987 M3) through the hub's `migrations`
7779
- * engine. Call it at the point of the boot where the data must already have the new
7780
- * shape — `onInitialize`, or `onRestoreDevices` for a migration that needs the
7781
- * restored devices — with the catalogue bound to the addon's ports
7782
- * (`defineAddonMigrations(ADDON_MIGRATIONS, ports)`).
7783
- *
7784
- * An engine that cannot be reached or refuses the catalogue is logged and runs
7785
- * nothing; the boot continues. A migration that FAILED (or was blocked by one)
7786
- * and declares `onFailure: 'block-owner'` makes this throw, so the addon does not
7787
- * serve data whose shape it cannot trust; `tolerate` migrations never do.
7788
- *
7789
- * ALWAYS pass the whole catalogue; a phase that must run only some of it passes
7790
- * `{ only: [ids] }` — never a filtered catalogue (the engine would judge the
7791
- * omitted applied ids "newer").
7804
+ * Several catalogues of ONE owner in one declaration (the engine replaces an owner's
7805
+ * catalogue on every declare, so two calls would each judge the other's ids "newer").
7806
+ * Build each entry with `migrationSet(catalogue, (api) => ports)`.
7792
7807
  */
7793
- async runMigrations(migrations, options) {
7808
+ async runMigrationSets(sets, options) {
7809
+ const api = this.ctx.migrationApi;
7810
+ if (api === void 0) throw new Error(`${this.ctx.id}: the migration API is not available on this context`);
7811
+ return this.runBound(sets.flatMap((set) => set.bind(api)), options);
7812
+ }
7813
+ async runBound(migrations, options) {
7794
7814
  const api = this.ctx.api.migrations;
7795
7815
  const report = await runAddonMigrations({
7796
7816
  declareOwner: (input) => api.declareOwner.mutate(input),
@@ -9195,6 +9215,20 @@ function defineRecordKinds(specs) {
9195
9215
  }
9196
9216
  return out;
9197
9217
  }
9218
+ /**
9219
+ * Entry kinds (D881): every list of user-created entries (notification
9220
+ * targets, brokers, LLM profiles) is ONE record kind with an id, a name and a
9221
+ * kind-specific body, and the admin UI lists/adds/edits/deletes all of them
9222
+ * through the `record-entries` capability with password fields derived from
9223
+ * the schema (`.meta({ secret: true })`).
9224
+ */
9225
+ /** The body of a plain entry: a name and the fields the kind adds. */
9226
+ function entryBody(shape) {
9227
+ return object({
9228
+ name: string().min(1),
9229
+ ...shape
9230
+ });
9231
+ }
9198
9232
  object({
9199
9233
  field: string().min(1),
9200
9234
  on: literal("advance")
@@ -12428,7 +12462,7 @@ function sleep(ms) {
12428
12462
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
12429
12463
  }
12430
12464
  //#endregion
12431
- //#region ../types/dist/composition-pOHbTzRB.mjs
12465
+ //#region ../types/dist/composition-BmBHuDTQ.mjs
12432
12466
  /**
12433
12467
  * The ffmpeg build every CamStack node downloads, per platform and arch.
12434
12468
  *
@@ -12861,7 +12895,7 @@ var table = {
12861
12895
  },
12862
12896
  dwell: {
12863
12897
  minArgs: 3,
12864
- maxArgs: 3,
12898
+ maxArgs: 4,
12865
12899
  apply: () => {
12866
12900
  throw new ExpressionEvalError("dwell: stateful evaluation context is required");
12867
12901
  }
@@ -13943,6 +13977,10 @@ var IntegrationInstanceRefSchema = object({
13943
13977
  ]),
13944
13978
  candidateStableId: string().optional()
13945
13979
  });
13980
+ object({
13981
+ cap: string().min(1),
13982
+ kind: string().min(1).optional()
13983
+ });
13946
13984
  var EncodeProfileSchema = object({
13947
13985
  video: object({
13948
13986
  codec: _enum([
@@ -16408,6 +16446,39 @@ var UnstampedEventMediaCountSchema = object({
16408
16446
  /** Sum across both, or `null` when either lane could not be counted. */
16409
16447
  total: number().int().nonnegative().nullable()
16410
16448
  }).nullable();
16449
+ /**
16450
+ * Where the stored event media sits, per storage location: how many media rows
16451
+ * and how many bytes carry each location id, how many carry none (legacy,
16452
+ * resolved to the default `eventMedia` location), and how many name a location
16453
+ * that was not asked about (a deleted or never-listed one).
16454
+ *
16455
+ * One covering-index aggregate per asked location plus the NULL one, and one
16456
+ * unfiltered total that scans the covering index: O(rows), not a walk of the
16457
+ * rows themselves. `unlisted` is total minus the ASKED locations minus NULL, so
16458
+ * it is a deleted location only when every location id was asked.
16459
+ * `null` is "could not be measured", never zero.
16460
+ */
16461
+ var MediaLocationCensusInputSchema = object({ locationIds: array(string().min(1)).max(50).readonly() });
16462
+ var MediaLocationCensusSchema = object({
16463
+ locations: array(object({
16464
+ locationId: string(),
16465
+ rows: number().int().nonnegative(),
16466
+ bytes: number().nonnegative()
16467
+ })).readonly(),
16468
+ unstamped: object({
16469
+ rows: number().int().nonnegative(),
16470
+ bytes: number().nonnegative()
16471
+ }),
16472
+ /** Rows stamped with a location id that was not in the asked list. */
16473
+ unlisted: object({
16474
+ rows: number().int().nonnegative(),
16475
+ bytes: number().nonnegative()
16476
+ }),
16477
+ total: object({
16478
+ rows: number().int().nonnegative(),
16479
+ bytes: number().nonnegative()
16480
+ })
16481
+ });
16411
16482
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
16412
16483
  /** The independently selectable logical storage classes — every class
16413
16484
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -46966,52 +47037,7 @@ DeviceType.Light, method(object({
46966
47037
  level: number().min(0).max(100),
46967
47038
  lastChangedAt: number()
46968
47039
  });
46969
- /**
46970
- * `broker` — unified pub/sub broker registry, system-scoped collection.
46971
- *
46972
- * The cap models any kind-tagged message broker the user wants to
46973
- * register and that other addons might consume. The first two kinds
46974
- * are MQTT (mosquitto / aedes embedded / cloud bridge) and
46975
- * Home Assistant (HA WebSocket — subscribe_entities + call_service).
46976
- * Future kinds (Zigbee2MQTT bridge, ZHA, KNX, Telegram, …) plug in
46977
- * the same surface.
46978
- *
46979
- * Why one cap, not one cap per kind:
46980
- * - The integrations page wants a single table of "every broker"
46981
- * across kinds; a unified cap drives it without join logic.
46982
- * - Generic admin operations (add / remove / test / status) are
46983
- * identical across kinds — duplicating them per cap was busywork.
46984
- * - The `network-access` cap precedent: same interface, many
46985
- * `providerKind: 'ingress'` implementations (Tailscale, ngrok, …).
46986
- *
46987
- * What stays kind-specific:
46988
- * - `getBrokerConfig` payload (kind decides whether it returns
46989
- * mqtt URL+creds, HA baseUrl+token, …) — typed as
46990
- * `Record<string, unknown>` at the wire; consumers narrow.
46991
- * - `publish` / `subscribe` / `getState` arguments (target / filter /
46992
- * key) — also typed as `Record<string, unknown>` so each kind can
46993
- * evolve its surface (MQTT topic+qos vs HA entity_id+domain)
46994
- * without rebreaking the cap signature.
46995
- * - `add` `settings` payload (different fields per kind, validated by
46996
- * the kind-specific provider).
46997
- *
46998
- * Bidirectionality:
46999
- * - `publish` is RPC — synchronous result (provider-defined).
47000
- * - `subscribe` returns a subscription handle; the actual message
47001
- * stream flows over the typed event-bus as `broker.message` events
47002
- * keyed by `(brokerId, subscriptionId)`. Consumers filter in their
47003
- * event handler. Subscriptions persist across reconnects — the
47004
- * provider re-subscribes upstream after a transport drop.
47005
- *
47006
- * Why event-bus push (not a subscription RPC stream):
47007
- * - Matches the rest of CamStack's D8 contract — events for telemetry,
47008
- * RPC for loss-is-a-bug. Broker messages are telemetry (a single
47009
- * drop is recoverable via `getState({key})`).
47010
- * - Frees `broker.subscribe` from holding a long-lived RPC channel.
47011
- * - Cross-process: events already route through `$event-bus`; no
47012
- * per-broker wire-shaping needed.
47013
- */
47014
- var BrokerStatusEnum = _enum([
47040
+ _enum([
47015
47041
  "connected",
47016
47042
  "disconnected",
47017
47043
  "connecting",
@@ -47019,141 +47045,12 @@ var BrokerStatusEnum = _enum([
47019
47045
  "unreachable",
47020
47046
  "error"
47021
47047
  ]);
47022
- var BrokerInfoSchema = object({
47023
- /** Stable broker id. Persisted; survives addon restarts. */
47024
- id: string(),
47025
- /** Addon id of the provider that OWNS this broker.
47026
- *
47027
- * The `broker` cap is a system-scoped collection: several addons
47028
- * register a `broker` provider, each owning a DISJOINT set of
47029
- * brokers (mqtt-broker owns `mqtt_*`, provider-homeassistant owns
47030
- * `ha_*`). A broker therefore belongs to exactly one addon — like a
47031
- * device belongs to one integration. The admin UI threads this id
47032
- * back as the `{ addonId }` system-collection selector on every
47033
- * id-keyed call (`get` / `getSettings` / `setSettings` / `remove` /
47034
- * `testConnection`), so the call routes to the OWNING provider
47035
- * instead of defaulting to the first-registered one. */
47036
- addonId: string(),
47037
- /** Human-readable name (operator-chosen at add-time). */
47038
- name: string(),
47039
- /** Provider-defined kind tag — `mqtt` / `home-assistant` / future. */
47040
- kind: string(),
47041
- status: BrokerStatusEnum,
47042
- /** Free-form provider-specific info (HA version, MQTT broker
47043
- * flavour, latency, mTLS active, …). */
47044
- info: record(string(), unknown()),
47045
- /** Ms epoch of the last connection probe / status update. */
47046
- lastCheckedAt: number().nullable(),
47047
- /** Last error message, when `status` indicates failure. */
47048
- error: string().nullable()
47049
- });
47050
47048
  var RegistryStatusSchema = object({
47051
47049
  brokerCount: number().int().nonnegative(),
47052
47050
  connectedCount: number().int().nonnegative()
47053
47051
  });
47054
- /**
47055
- * One entry per `broker` provider — which addon provides which broker
47056
- * kind(s). The unified create picker reads this to know, for each
47057
- * (addonId, kind) pair the operator can pick, where to route the
47058
- * follow-up `getSettingsSchema` / `testSettings` / `add` calls (via the
47059
- * `{ addonId }` selector). A provider only advertises a kind here when
47060
- * it implements `getSettingsSchema` for that kind (so the picker never
47061
- * offers a kind whose creation form can't be rendered).
47062
- */
47063
- var BrokerProviderInfoSchema = object({
47064
- /** Addon id of the `broker` provider this entry describes. */
47065
- addonId: string(),
47066
- /** Broker kinds this provider can create, with a display label. */
47067
- kinds: array(object({
47068
- kind: string(),
47069
- label: string(),
47070
- /**
47071
- * Relative hub path to start an interactive account link (OAuth popup).
47072
- * May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
47073
- */
47074
- interactiveConnectPath: string().min(1).optional(),
47075
- /** Relative hub path to disconnect the linked account (same popup pattern). */
47076
- interactiveDisconnectPath: string().min(1).optional(),
47077
- /**
47078
- * The kind signs in through a server-held interactive session instead of
47079
- * (or before) typed credentials. `basePath` is a hub-relative route set
47080
- * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
47081
- * contract: `POST {basePath}/start` (body: the form's settings) answers
47082
- * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
47083
- * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
47084
- * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
47085
- * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
47086
- * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
47087
- * (`{ sessionId }`) drops the session. The dialog that edits a broker
47088
- * offers it as the default path; the fields the session fills are
47089
- * marked `filledBySignIn` in the kind's settings schema.
47090
- *
47091
- * `methods` lists the ways the session can sign in, recommended first:
47092
- * `'device-code'` adds `POST {basePath}/code/start` (body: the form's
47093
- * settings) answering `{ sessionId, userCode, verificationUrl,
47094
- * expiresAt }` — the operator types `userCode` at `verificationUrl` on
47095
- * any device, and the same `status` / `commit` / `cancel` routes follow
47096
- * (status then carries `method`, `userCode`, `verificationUrl`,
47097
- * `expiresAt` and the phases `'awaiting-code'` / `'expired'`);
47098
- * `'proxy'` is the `{basePath}/start` flow above. Absent means
47099
- * `['proxy']`.
47100
- */
47101
- signIn: object({
47102
- basePath: string().min(1),
47103
- methods: array(_enum(["device-code", "proxy"])).optional()
47104
- }).optional()
47105
- }))
47106
- });
47107
- var ListInputSchema = object({
47108
- /** Optional kind filter — `list({kind:'home-assistant'})` returns
47109
- * only HA brokers. Omit to list every broker. */
47110
- kind: string().optional() });
47111
47052
  var GetInputSchema = object({ id: string() });
47112
- var AddInputSchema = object({
47113
- kind: string().min(1),
47114
- name: string().min(1),
47115
- /**
47116
- * ADOPT an existing id instead of minting a new one.
47117
- *
47118
- * Written the day this cost an outage. A broker's id is not a detail: HA
47119
- * devices carry it inside their `stableId` (`ha:ha_004:dev:…`), so a broker
47120
- * lost from config and re-added as `ha_001` leaves every one of its devices
47121
- * bound to a broker that no longer exists. Re-entering the password under the
47122
- * ORIGINAL id turns a multi-step device migration back into re-entering a
47123
- * password.
47124
- *
47125
- * A provider MUST refuse an id that is already in use — adopting a live
47126
- * broker's id would silently take it over.
47127
- */
47128
- id: string().min(1).optional(),
47129
- /** Kind-specific settings (e.g. MQTT `{url,username,password}` or HA
47130
- * `{baseUrl,accessToken}`). Validated by the kind-specific provider
47131
- * branch on receipt — invalid shape rejects the add. */
47132
- settings: record(string(), unknown())
47133
- });
47134
- var AddResultSchema = object({ id: string() });
47135
- var RemoveInputSchema = object({ id: string() });
47136
- var TestConnectionResultSchema = discriminatedUnion("ok", [object({
47137
- ok: literal(true),
47138
- latencyMs: number().nonnegative()
47139
- }), object({
47140
- ok: literal(false),
47141
- error: string()
47142
- })]);
47143
47053
  var SettingsRecordSchema$1 = record(string(), unknown());
47144
- var SettingsSchemaInputSchema = object({ kind: string() });
47145
- var TestSettingsInputSchema = object({
47146
- kind: string(),
47147
- settings: SettingsRecordSchema$1
47148
- });
47149
- var TestSettingsResultSchema = discriminatedUnion("ok", [object({
47150
- ok: literal(true),
47151
- latencyMs: number().nonnegative().optional()
47152
- }).strict(), object({
47153
- ok: literal(false),
47154
- error: string()
47155
- })]);
47156
- var SettingsSchemaResultSchema = unknown().nullable();
47157
47054
  var PublishInputSchema = object({
47158
47055
  brokerId: string(),
47159
47056
  /** Kind-specific routing target.
@@ -47187,25 +47084,7 @@ var GetStateInputSchema = object({
47187
47084
  * HA: entity_id (returns the cached entity state). */
47188
47085
  key: string()
47189
47086
  });
47190
- method(ListInputSchema, array(BrokerInfoSchema)), method(GetInputSchema, BrokerInfoSchema.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
47191
- kind: "mutation",
47192
- auth: "admin"
47193
- }), method(RemoveInputSchema, _void(), {
47194
- kind: "mutation",
47195
- auth: "admin"
47196
- }), method(GetInputSchema, TestConnectionResultSchema, {
47197
- kind: "mutation",
47198
- auth: "admin"
47199
- }), method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(object({
47200
- id: string(),
47201
- settings: SettingsRecordSchema$1
47202
- }), _void(), {
47203
- kind: "mutation",
47204
- auth: "admin"
47205
- }), method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(SettingsSchemaInputSchema, SettingsSchemaResultSchema, { auth: "admin" }), method(TestSettingsInputSchema, TestSettingsResultSchema, {
47206
- kind: "mutation",
47207
- auth: "admin"
47208
- }), method(PublishInputSchema, unknown(), {
47087
+ method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(PublishInputSchema, unknown(), {
47209
47088
  kind: "mutation",
47210
47089
  auth: "admin"
47211
47090
  }), method(SubscribeInputSchema, SubscribeResultSchema, {
@@ -49736,7 +49615,9 @@ var ThresholdTransformDraftSchema = object({
49736
49615
  comparison: _enum(["gte", "lte"]),
49737
49616
  threshold: number(),
49738
49617
  startDwellMs: number().nonnegative(),
49739
- stopDwellMs: number().nonnegative()
49618
+ stopDwellMs: number().nonnegative(),
49619
+ /** Samples a start needs; absent = the compiler's default for the source (2 for running power, else 1). */
49620
+ minSamples: number().int().min(1).optional()
49740
49621
  });
49741
49622
  var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
49742
49623
  IdentityTransformDraftSchema,
@@ -51303,7 +51184,14 @@ var DiscoveryCandidateSchema = object({
51303
51184
  /** `stableId` of the gateway candidate this device was found BEHIND. */
51304
51185
  parentStableId: string().optional(),
51305
51186
  /** `false` = shown for context but not pickable. Default true. */
51306
- selectable: boolean().optional()
51187
+ selectable: boolean().optional(),
51188
+ /**
51189
+ * Keys of the provider's creation form (`getChildCreationSchema`) this candidate
51190
+ * cannot be adopted without — a key for an encrypted board, a pairing code. The
51191
+ * admin asks for exactly these, on the creation form prefilled with
51192
+ * `prefilledConfig`, before it adopts. Absent or empty = adopt as it is.
51193
+ */
51194
+ needsParams: array(string()).optional()
51307
51195
  });
51308
51196
  /**
51309
51197
  * Flat device summary returned by `createDevice` / `adoptDiscoveredDevice`.
@@ -51362,12 +51250,24 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
51362
51250
  }), array(DiscoveryCandidateSchema), {
51363
51251
  kind: "mutation",
51364
51252
  auth: "admin"
51365
- }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
51253
+ }), method(object({}), CreationSchemaOutputSchema), method(object({
51254
+ /** The integration asked about; a provider whose integrations differ answers per one. */
51255
+ integrationId: string().optional() }), object({ deviceType: _enum(DeviceType).nullable() })), method(object({
51256
+ candidate: DiscoveryCandidateSchema,
51257
+ /** The integration the operator adopts into; a provider with several instances needs it. */
51258
+ integrationId: string().optional()
51259
+ }), DeviceSummarySchema, {
51366
51260
  kind: "mutation",
51367
51261
  auth: "admin"
51368
- }), method(object({}), boolean()), method(object({ type: _enum(DeviceType) }), CreationSchemaOutputSchema), method(object({
51262
+ }), method(object({}), boolean()), method(object({
51369
51263
  type: _enum(DeviceType),
51370
- config: record(string(), unknown())
51264
+ /** The integration asked about; a provider whose integrations differ answers per one. */
51265
+ integrationId: string().optional()
51266
+ }), CreationSchemaOutputSchema), method(object({
51267
+ type: _enum(DeviceType),
51268
+ config: record(string(), unknown()),
51269
+ /** The integration the operator adds the device to; a provider with several instances needs it. */
51270
+ integrationId: string().optional()
51371
51271
  }), DeviceSummarySchema, {
51372
51272
  kind: "mutation",
51373
51273
  auth: "admin"
@@ -52077,7 +51977,10 @@ method(object({
52077
51977
  auth: "admin"
52078
51978
  }), method(object({
52079
51979
  addonId: string(),
52080
- type: _enum(DeviceType)
51980
+ type: _enum(DeviceType),
51981
+ /** The integration the form is for; a provider whose integrations differ (a hub
51982
+ * integration takes no manual add) answers per integration. Absent = the addon's own. */
51983
+ integrationId: string().optional()
52081
51984
  }), unknown().nullable()), method(object({
52082
51985
  addonId: string(),
52083
51986
  type: _enum(DeviceType),
@@ -52161,7 +52064,11 @@ method(object({
52161
52064
  kind: "mutation",
52162
52065
  auth: "admin",
52163
52066
  timeoutMs: 12e4
52164
- }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
52067
+ }), method(object({
52068
+ addonId: string(),
52069
+ /** The integration the Add-Device dialog is open on; absent = the addon's own. */
52070
+ integrationId: string().optional()
52071
+ }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
52165
52072
  deviceId: number(),
52166
52073
  key: string(),
52167
52074
  value: unknown()
@@ -55034,7 +54941,7 @@ var TestConnectionStatusEnum = _enum([
55034
54941
  "inconclusive",
55035
54942
  "unsupported"
55036
54943
  ]);
55037
- var TestConnectionResultSchema$1 = object({
54944
+ var TestConnectionResultSchema = object({
55038
54945
  /** True ONLY for `validated`. Never true for a test that did not run. */
55039
54946
  success: boolean(),
55040
54947
  error: string().optional(),
@@ -55079,7 +54986,7 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
55079
54986
  }), method(_void(), array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(object({
55080
54987
  addonId: string(),
55081
54988
  settings: record(string(), unknown())
55082
- }), TestConnectionResultSchema$1, {
54989
+ }), TestConnectionResultSchema, {
55083
54990
  kind: "mutation",
55084
54991
  auth: "admin"
55085
54992
  });
@@ -55106,6 +55013,14 @@ var ConfigSchemaPassthrough$3 = custom();
55106
55013
  var IntegrationInstanceIdSchema = string().min(1);
55107
55014
  var IntegrationInstanceModeSchema = _enum(["single", "multiple"]);
55108
55015
  /**
55016
+ * What the addon's instances ARE for the Integrations page (planning#416). `devices`: each
55017
+ * instance is an integration that brings devices (the registry owns its on/off switch);
55018
+ * `services`: a connection configured from the addon's own function page, never listed on
55019
+ * Integrations.
55020
+ * It is the same vocabulary as the manifest's `integrationRole`, which stays as an override.
55021
+ */
55022
+ var IntegrationInstanceRoleSchema = _enum(["devices", "services"]);
55023
+ /**
55109
55024
  * One kind of instance a provider can create (an adapter, an account type). The sign-in and
55110
55025
  * connect fields follow the `broker` contract (`broker.cap.ts`): `signIn.basePath` is a
55111
55026
  * hub-relative route set speaking the sign-in contract, `connectPath` / `disconnectPath` open an
@@ -55116,6 +55031,22 @@ var IntegrationInstanceKindSchema = object({
55116
55031
  /** Stable id of the kind, sent back as `createInstance.kind`. */
55117
55032
  id: string().min(1),
55118
55033
  label: string().min(1),
55034
+ /**
55035
+ * The function capability this kind is configured for (`broker`, `smtp-provider`,
55036
+ * `device-provider`, ...). A page section is the kinds whose `functionCap` it names (D1013); a
55037
+ * provider with more than one section must name it on every kind.
55038
+ */
55039
+ functionCap: string().min(1),
55040
+ /**
55041
+ * For `functionCap: 'broker'`: the registry kind of the broker an instance of this kind is
55042
+ * (`matter`, `home-assistant`, ...). A caller that needs a broker of one kind (a link field)
55043
+ * finds the instances whose kind names it; absent takes the kind `id`.
55044
+ */
55045
+ brokerKind: string().min(1).optional(),
55046
+ /** What instances of this kind are for the Integrations page; absent takes the provider's `role`. */
55047
+ role: IntegrationInstanceRoleSchema.optional(),
55048
+ /** `testInstance` really probes the remote for this kind; absent takes the provider's `canTest`. */
55049
+ canTest: boolean().optional(),
55119
55050
  /** The kind signs in through a server-held interactive session. */
55120
55051
  signIn: object({
55121
55052
  basePath: string().min(1),
@@ -55126,22 +55057,38 @@ var IntegrationInstanceKindSchema = object({
55126
55057
  /** Relative hub path to disconnect that account. */
55127
55058
  disconnectPath: string().min(1).optional()
55128
55059
  });
55060
+ /**
55061
+ * How devices of an instance are found. `none`: the operator adds them by hand; `lan`: the addon
55062
+ * scans the network before any instance exists (the wizard offers the candidates); `account`: the
55063
+ * devices appear after the instance signs in. `scopedToInstance`: a discovery run belongs to ONE
55064
+ * instance and its candidates are claimed by it.
55065
+ */
55066
+ var IntegrationInstanceDiscoverySchema = object({
55067
+ mode: _enum([
55068
+ "none",
55069
+ "lan",
55070
+ "account"
55071
+ ]),
55072
+ scopedToInstance: boolean()
55073
+ });
55074
+ /**
55075
+ * One link a kind of this provider declares (D1013 rule 5): the body `field` of an instance of
55076
+ * `kind` holds the id of an instance of the function cap `to.cap` (of kind `to.kind`, when set).
55077
+ * The hub indexes these so the target's delete is refused while a link names it.
55078
+ */
55079
+ var IntegrationInstanceLinkSchema = object({
55080
+ kind: string().min(1),
55081
+ field: string().min(1),
55082
+ to: object({
55083
+ cap: string().min(1),
55084
+ kind: string().min(1).optional()
55085
+ })
55086
+ });
55129
55087
  var IntegrationInstanceDescriptionSchema = object({
55130
55088
  /** What the instances are for the Integrations page; see {@link IntegrationInstanceRoleSchema}. */
55131
- role: _enum([
55132
- "devices",
55133
- "services",
55134
- "both"
55135
- ]),
55089
+ role: IntegrationInstanceRoleSchema,
55136
55090
  /** How the devices of an instance are found; absent means `{ mode: 'none' }`. */
55137
- discovery: object({
55138
- mode: _enum([
55139
- "none",
55140
- "lan",
55141
- "account"
55142
- ]),
55143
- scopedToInstance: boolean()
55144
- }).optional(),
55091
+ discovery: IntegrationInstanceDiscoverySchema.optional(),
55145
55092
  /** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
55146
55093
  instanceMode: IntegrationInstanceModeSchema,
55147
55094
  /** What the instance is, for the UI (`destination`, `relay`, `account`). */
@@ -55162,7 +55109,9 @@ var IntegrationInstanceDescriptionSchema = object({
55162
55109
  * `createInstance` without an `id` works: the provider mints it. Absent means the caller must
55163
55110
  * send an id (the UI then mints an opaque one).
55164
55111
  */
55165
- mintsId: boolean().optional()
55112
+ mintsId: boolean().optional(),
55113
+ /** The links to other instances the provider's kinds declare; absent means none. */
55114
+ links: array(IntegrationInstanceLinkSchema).optional()
55166
55115
  });
55167
55116
  var IntegrationInstanceStatusSchema = object({
55168
55117
  state: _enum([
@@ -55200,10 +55149,16 @@ var IntegrationInstancePatchSchema = object({
55200
55149
  /** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
55201
55150
  values: record(string(), unknown())
55202
55151
  });
55203
- method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema.nullable() }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
55152
+ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({
55153
+ id: IntegrationInstanceIdSchema.nullable(),
55154
+ /** The kind of the create form (`id: null`) of a provider with several. */
55155
+ kind: string().min(1).optional()
55156
+ }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
55204
55157
  id: IntegrationInstanceIdSchema.optional(),
55205
55158
  name: string().min(1),
55206
- kind: string().min(1).optional()
55159
+ kind: string().min(1).optional(),
55160
+ /** Form values written with the record (a link picked in the create dialog). */
55161
+ values: record(string(), unknown()).optional()
55207
55162
  }), object({ id: string() }), {
55208
55163
  kind: "mutation",
55209
55164
  auth: "admin"
@@ -55221,8 +55176,10 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
55221
55176
  auth: "admin"
55222
55177
  }), optionalMethod(object({
55223
55178
  id: IntegrationInstanceIdSchema.nullable(),
55224
- values: record(string(), unknown())
55225
- }), TestConnectionResultSchema$1, {
55179
+ values: record(string(), unknown()),
55180
+ /** The kind to test when `id` is null and the provider has several. */
55181
+ kind: string().min(1).optional()
55182
+ }), TestConnectionResultSchema, {
55226
55183
  kind: "mutation",
55227
55184
  auth: "admin"
55228
55185
  });
@@ -57725,6 +57682,380 @@ var SystemMetricsSchema = object({
57725
57682
  gpuMemoryPercent: number().optional()
57726
57683
  });
57727
57684
  method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
57685
+ /**
57686
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
57687
+ * config documents, mirrors. The third storage API next to `ctx.settings`
57688
+ * (operator intent, D870) and device-history (numbers over time, D850).
57689
+ *
57690
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
57691
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
57692
+ * that with the addon id closed over). It is deliberately NOT in any input
57693
+ * schema, so a session can never supply it, and a call with no stamp is refused
57694
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
57695
+ * addons go through the owner's capability.
57696
+ *
57697
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
57698
+ * never `[]`. Secret fields are never on the wire: a read shows the
57699
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
57700
+ * resolves itself, and a write may carry only a keychain marker bound to the
57701
+ * row's own ref.
57702
+ *
57703
+ * Internal: addons reach it through `ctx.records`, never directly.
57704
+ */
57705
+ var RecordIdSchema = string().min(1).max(256);
57706
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
57707
+ var RecordBodySchema = record(string(), unknown());
57708
+ var RecordInputSchema = object({
57709
+ id: RecordIdSchema,
57710
+ /** The device this row belongs to (D865 removal, per-device reads). */
57711
+ deviceId: number().int().optional(),
57712
+ /** The domain clock, ms: observed / created / opened. */
57713
+ at: number().int().optional(),
57714
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
57715
+ expiresAt: number().int().optional(),
57716
+ data: RecordBodySchema
57717
+ });
57718
+ var RecordViewSchema = object({
57719
+ id: string(),
57720
+ deviceId: number().int().nullable(),
57721
+ at: number().nullable(),
57722
+ expiresAt: number().nullable(),
57723
+ rev: number().int(),
57724
+ updatedAt: number(),
57725
+ data: RecordBodySchema
57726
+ });
57727
+ /** Declared index fields only. Anything else does not compile, by design. */
57728
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
57729
+ string(),
57730
+ number(),
57731
+ boolean(),
57732
+ object({ in: array(union([
57733
+ string(),
57734
+ number(),
57735
+ boolean()
57736
+ ])).min(1).max(RECORD_BATCH_MAX) }),
57737
+ object({
57738
+ gt: union([string(), number()]).optional(),
57739
+ gte: union([string(), number()]).optional(),
57740
+ lt: union([string(), number()]).optional(),
57741
+ lte: union([string(), number()]).optional()
57742
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
57743
+ ]));
57744
+ var KindShape = { kind: RecordKindNameSchema };
57745
+ var TimeWindowShape = {
57746
+ deviceId: number().int().optional(),
57747
+ atFrom: number().optional(),
57748
+ atTo: number().optional()
57749
+ };
57750
+ var RecordQueryInputSchema = object({
57751
+ ...KindShape,
57752
+ ...TimeWindowShape,
57753
+ where: RecordWhereSchema.optional(),
57754
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
57755
+ order: _enum(["at", "id"]).optional(),
57756
+ desc: boolean().optional(),
57757
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
57758
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
57759
+ cursor: string().min(1).optional()
57760
+ });
57761
+ var RecordQueryResultSchema = object({
57762
+ records: array(RecordViewSchema),
57763
+ nextCursor: string().nullable()
57764
+ });
57765
+ var RecordKindStateSchema = _enum([
57766
+ "created",
57767
+ "unchanged",
57768
+ "updated"
57769
+ ]);
57770
+ var DeclareKindResultSchema = object({
57771
+ kindId: number().int(),
57772
+ state: RecordKindStateSchema,
57773
+ createdIndexes: array(string())
57774
+ });
57775
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
57776
+ var SecretRefsList = array(string());
57777
+ /**
57778
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
57779
+ * All ops of one call share ONE database file and ONE `transactFamily`.
57780
+ */
57781
+ var RecordTransactOpSchema = discriminatedUnion("op", [
57782
+ object({
57783
+ op: literal("put"),
57784
+ kind: RecordKindNameSchema,
57785
+ record: RecordInputSchema,
57786
+ ifRev: number().int().min(0).optional()
57787
+ }),
57788
+ object({
57789
+ op: literal("patch"),
57790
+ kind: RecordKindNameSchema,
57791
+ id: RecordIdSchema,
57792
+ data: RecordBodySchema,
57793
+ at: number().int().nullable().optional(),
57794
+ expiresAt: number().int().nullable().optional(),
57795
+ ifRev: number().int().min(1).optional()
57796
+ }),
57797
+ object({
57798
+ op: literal("delete"),
57799
+ kind: RecordKindNameSchema,
57800
+ id: RecordIdSchema
57801
+ })
57802
+ ]);
57803
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
57804
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
57805
+ kind: "mutation",
57806
+ auth: "admin"
57807
+ }), method(object({
57808
+ ...KindShape,
57809
+ id: RecordIdSchema
57810
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
57811
+ ...KindShape,
57812
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
57813
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
57814
+ ...KindShape,
57815
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
57816
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
57817
+ ...KindShape,
57818
+ record: RecordInputSchema,
57819
+ /** Compare-and-set. `0` means "the row must not exist". */
57820
+ ifRev: number().int().min(0).optional()
57821
+ }), object({
57822
+ rev: number().int(),
57823
+ releasedRefs: SecretRefsList
57824
+ }), {
57825
+ kind: "mutation",
57826
+ auth: "admin"
57827
+ }), method(object({
57828
+ ...KindShape,
57829
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
57830
+ }), object({
57831
+ count: number().int(),
57832
+ releasedRefs: SecretRefsList
57833
+ }), {
57834
+ kind: "mutation",
57835
+ auth: "admin"
57836
+ }), method(object({
57837
+ ...KindShape,
57838
+ id: RecordIdSchema,
57839
+ data: RecordBodySchema,
57840
+ at: number().int().nullable().optional(),
57841
+ expiresAt: number().int().nullable().optional(),
57842
+ ifRev: number().int().min(1).optional()
57843
+ }), object({
57844
+ rev: number().int(),
57845
+ releasedRefs: SecretRefsList
57846
+ }), {
57847
+ kind: "mutation",
57848
+ auth: "admin"
57849
+ }), method(object({
57850
+ ...KindShape,
57851
+ id: RecordIdSchema
57852
+ }), object({
57853
+ deleted: boolean(),
57854
+ secretRefs: SecretRefsList
57855
+ }), {
57856
+ kind: "mutation",
57857
+ auth: "admin"
57858
+ }), method(object({
57859
+ ...KindShape,
57860
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
57861
+ }), object({
57862
+ deleted: number().int(),
57863
+ secretRefs: SecretRefsList
57864
+ }), {
57865
+ kind: "mutation",
57866
+ auth: "admin"
57867
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
57868
+ ...KindShape,
57869
+ ...TimeWindowShape,
57870
+ where: RecordWhereSchema.optional()
57871
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
57872
+ ...KindShape,
57873
+ deviceId: number().int().optional(),
57874
+ from: number(),
57875
+ to: number(),
57876
+ bucketMs: number().int().positive()
57877
+ }), object({ buckets: array(object({
57878
+ bucketStart: number(),
57879
+ count: number().int()
57880
+ })) }), { auth: "admin" }), method(object({
57881
+ ...KindShape,
57882
+ op: _enum([
57883
+ "sum",
57884
+ "min",
57885
+ "max",
57886
+ "count"
57887
+ ]),
57888
+ field: RecordFieldPathSchema.optional(),
57889
+ groupBy: RecordFieldPathSchema.optional(),
57890
+ where: RecordWhereSchema.optional()
57891
+ }), object({ rows: array(object({
57892
+ group: union([
57893
+ string(),
57894
+ number(),
57895
+ _null()
57896
+ ]),
57897
+ value: number().nullable()
57898
+ })) }), { auth: "admin" }), method(object({
57899
+ ...KindShape,
57900
+ deviceId: number().int().optional(),
57901
+ atBefore: number().optional(),
57902
+ where: RecordWhereSchema.optional()
57903
+ }), object({
57904
+ deleted: number().int(),
57905
+ secretRefs: SecretRefsList
57906
+ }), {
57907
+ kind: "mutation",
57908
+ auth: "admin"
57909
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
57910
+ results: array(object({
57911
+ rev: number().int().nullable(),
57912
+ deleted: boolean()
57913
+ })),
57914
+ releasedRefs: SecretRefsList,
57915
+ secretRefs: SecretRefsList
57916
+ }), {
57917
+ kind: "mutation",
57918
+ auth: "admin"
57919
+ }), method(object({
57920
+ deviceId: number().int(),
57921
+ kinds: array(RecordKindNameSchema).optional()
57922
+ }), object({
57923
+ deleted: record(string(), number().int()),
57924
+ secretRefs: SecretRefsList
57925
+ }), {
57926
+ kind: "mutation",
57927
+ auth: "admin"
57928
+ }), method(object(KindShape), object({ id: number().int() }), {
57929
+ kind: "mutation",
57930
+ auth: "admin"
57931
+ });
57932
+ /**
57933
+ * The wire shapes of the migration API, version 1 (planning#447).
57934
+ *
57935
+ * A migration is code that outlives the server it was written against: an addon at
57936
+ * version 1.4 that is brought to 1.9 in one jump still runs its 1.4 catalogue, against
57937
+ * the 1.9 kernel. The only thing that code may call is {@link MigrationApiV1}; this file
57938
+ * is the contract of every method of it, one Zod pair per method.
57939
+ *
57940
+ * APPEND-ONLY. A released method is never removed and never changes meaning: an input
57941
+ * field is never removed or made required, an enum never narrows, an output field is
57942
+ * never removed. A change that cannot be expressed that way is `migration-api.v2`, next
57943
+ * to this file. `scripts/check-migration-api-append-only.ts` holds the line against
57944
+ * `scripts/migration-api-contract.json`, and every `behaviours` id below must have an
57945
+ * `it('<id>'` in `migration-api.contract.spec.ts`.
57946
+ */
57947
+ var Rows = record(string(), unknown());
57948
+ var IntegrationId = object({ integrationId: string().min(1) });
57949
+ var RecordId = object({ id: string().min(1) });
57950
+ var RecordRowSchema = object({
57951
+ id: string(),
57952
+ deviceId: number().int().nullable(),
57953
+ at: number().nullable(),
57954
+ expiresAt: number().nullable(),
57955
+ rev: number().int(),
57956
+ updatedAt: number(),
57957
+ data: Rows
57958
+ });
57959
+ var RecordPutShape = {
57960
+ id: string().min(1),
57961
+ deviceId: number().int().optional(),
57962
+ at: number().int().optional(),
57963
+ expiresAt: number().int().optional(),
57964
+ data: Rows
57965
+ };
57966
+ var MigrationIntegrationSchema = object({
57967
+ id: string(),
57968
+ addonId: string(),
57969
+ name: string(),
57970
+ info: Rows,
57971
+ originStableId: string().optional()
57972
+ });
57973
+ var MigrationDeviceSchema = object({
57974
+ id: number().int(),
57975
+ integrationId: string().nullable().optional(),
57976
+ /** The owning device; null or absent for a root. */
57977
+ parentDeviceId: number().int().nullable().optional(),
57978
+ type: string().optional(),
57979
+ name: string().optional(),
57980
+ stableId: string().optional()
57981
+ });
57982
+ /** What the engine says about the migration API it serves: lets an addon notice an older server. */
57983
+ var MigrationApiInfoSchema = object({
57984
+ version: number().int(),
57985
+ methods: array(string())
57986
+ });
57987
+ object({
57988
+ message: string(),
57989
+ meta: Rows.optional(),
57990
+ /** Grouping tags of the line; a line about a device carries `{ deviceId }`. */
57991
+ tags: object({ deviceId: number().int().optional() }).optional()
57992
+ });
57993
+ object({
57994
+ owner: string().min(1),
57995
+ metas: array(MigrationMetaSchema)
57996
+ }), object({
57997
+ bootId: string(),
57998
+ snapshot: _enum([
57999
+ "none",
58000
+ "written",
58001
+ "refused"
58002
+ ]),
58003
+ steps: array(MigrationOwnerStepSchema),
58004
+ /** The migration API the engine serves; absent from a server that predates it. */
58005
+ migrationApi: MigrationApiInfoSchema.optional()
58006
+ }), object({ id: string().min(1) }), object({
58007
+ proceed: boolean(),
58008
+ state: union([literal("pending"), MigrationStatusSchema]),
58009
+ reason: string().nullable()
58010
+ }), object({
58011
+ id: string().min(1),
58012
+ result: MigrationOwnerResultSchema
58013
+ }), object({
58014
+ status: MigrationStatusSchema,
58015
+ error: string().nullable(),
58016
+ rowsChanged: number().int().nonnegative()
58017
+ }), object({
58018
+ rows: number().int().nonnegative(),
58019
+ secrets: number().int().nonnegative()
58020
+ }), IntegrationId.extend({ patch: Rows }), object({ written: boolean() }), IntegrationId.extend({ keys: array(string().min(1)) }), object({
58021
+ present: boolean(),
58022
+ removed: Rows
58023
+ }), RecordRowSchema.nullable(), RecordRowSchema.nullable(), object({
58024
+ ...RecordPutShape,
58025
+ ifRev: number().int().optional()
58026
+ }), object({ rev: number().int() }), object({ records: array(object(RecordPutShape)) }), object({ count: number().int().nonnegative() }), RecordId.extend({
58027
+ partial: Rows,
58028
+ ifRev: number().int().optional()
58029
+ }), object({ rev: number().int() }), object({ deleted: boolean() }), object({
58030
+ deviceId: number().int().optional(),
58031
+ atFrom: number().optional(),
58032
+ atTo: number().optional(),
58033
+ where: RecordWhereSchema.optional(),
58034
+ limit: number().int().min(1).optional(),
58035
+ cursor: string().min(1).optional(),
58036
+ resolveSecrets: boolean().optional()
58037
+ }), object({
58038
+ records: array(RecordRowSchema),
58039
+ nextCursor: string().nullable()
58040
+ }), object({
58041
+ deviceId: number().int().optional(),
58042
+ atBefore: number().optional(),
58043
+ where: RecordWhereSchema.optional()
58044
+ }), object({ count: number().int().nonnegative() }), object({}), object({ store: Rows }), object({ patch: Rows }), object({}), object({ keys: array(string().min(1)) }), object({ removed: array(string()) }), object({ refs: array(string()) }), object({ values: record(string(), string().nullable()) }), object({
58045
+ ref: string().min(1),
58046
+ value: string()
58047
+ }), object({}), object({ refs: array(string()) }), object({ deleted: number().int().nonnegative() }), object({}), object({ integrations: array(MigrationIntegrationSchema) }), object({ id: string().min(1) }), MigrationIntegrationSchema.nullable(), object({
58048
+ addonId: string().min(1),
58049
+ integrationId: string().min(1).optional()
58050
+ }), object({ devices: array(MigrationDeviceSchema) }), object({ deviceId: number().int() }), object({
58051
+ id: number().int(),
58052
+ integrationId: string().nullable(),
58053
+ /** Whether the device carries any stored config; its content is not offered. */
58054
+ hasConfig: boolean()
58055
+ }).nullable(), object({
58056
+ deviceId: number().int(),
58057
+ integrationId: string().min(1)
58058
+ }), object({}), object({}), object({ nodeId: string() }), object({}), object({});
57728
58059
  method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { auth: "admin" }), method(object({ owner: string().optional() }), object({ pending: array(MigrationPendingEntrySchema) }), { auth: "admin" }), method(object({ id: string().min(1) }), MigrationDryRunResultSchema, { auth: "admin" }), method(object({
57729
58060
  id: string().min(1),
57730
58061
  error: string().min(1)
@@ -57754,7 +58085,9 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
57754
58085
  "written",
57755
58086
  "refused"
57756
58087
  ]),
57757
- steps: array(MigrationOwnerStepSchema)
58088
+ steps: array(MigrationOwnerStepSchema),
58089
+ /** The migration API this engine serves (additive: a server that predates it omits it). */
58090
+ migrationApi: MigrationApiInfoSchema.optional()
57758
58091
  }), {
57759
58092
  kind: "mutation",
57760
58093
  auth: "admin"
@@ -60471,7 +60804,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
60471
60804
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
60472
60805
  kind: "mutation",
60473
60806
  auth: "admin"
60474
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
60807
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(MediaLocationCensusInputSchema, MediaLocationCensusSchema, {
60808
+ kind: "query",
60809
+ auth: "admin"
60810
+ }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
60475
60811
  kind: "query",
60476
60812
  auth: "admin"
60477
60813
  }), method(object({}), array(RelocateJobSchema).readonly(), {
@@ -63296,7 +63632,7 @@ var BrokerStatusSchema$1 = _enum([
63296
63632
  "unreachable",
63297
63633
  "tls-error"
63298
63634
  ]);
63299
- var BrokerInfoSchema$1 = object({
63635
+ var BrokerInfoSchema = object({
63300
63636
  id: string(),
63301
63637
  name: string(),
63302
63638
  url: string(),
@@ -63359,7 +63695,7 @@ var StatusSchema = object({
63359
63695
  brokerCount: number(),
63360
63696
  embeddedRunning: boolean()
63361
63697
  });
63362
- method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
63698
+ method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
63363
63699
  kind: "mutation",
63364
63700
  auth: "admin"
63365
63701
  }), method(IdInputSchema, _void(), {
@@ -70882,253 +71218,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, DeviceType.Gateway, met
70882
71218
  auth: "admin"
70883
71219
  });
70884
71220
  /**
70885
- * records - an addon's own facts and documents (D881): ledgers, audit rows,
70886
- * config documents, mirrors. The third storage API next to `ctx.settings`
70887
- * (operator intent, D870) and device-history (numbers over time, D850).
70888
- *
70889
- * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
70890
- * crossed a process and stated by a hub in-process caller (`ctx.records` does
70891
- * that with the addon id closed over). It is deliberately NOT in any input
70892
- * schema, so a session can never supply it, and a call with no stamp is refused
70893
- * `records/no-caller`. A kind is readable and writable only by its owner; other
70894
- * addons go through the owner's capability.
70895
- *
70896
- * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
70897
- * never `[]`. Secret fields are never on the wire: a read shows the
70898
- * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
70899
- * resolves itself, and a write may carry only a keychain marker bound to the
70900
- * row's own ref.
70901
- *
70902
- * Internal: addons reach it through `ctx.records`, never directly.
70903
- */
70904
- var RecordIdSchema = string().min(1).max(256);
70905
- /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
70906
- var RecordBodySchema = record(string(), unknown());
70907
- var RecordInputSchema = object({
70908
- id: RecordIdSchema,
70909
- /** The device this row belongs to (D865 removal, per-device reads). */
70910
- deviceId: number().int().optional(),
70911
- /** The domain clock, ms: observed / created / opened. */
70912
- at: number().int().optional(),
70913
- /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
70914
- expiresAt: number().int().optional(),
70915
- data: RecordBodySchema
70916
- });
70917
- var RecordViewSchema = object({
70918
- id: string(),
70919
- deviceId: number().int().nullable(),
70920
- at: number().nullable(),
70921
- expiresAt: number().nullable(),
70922
- rev: number().int(),
70923
- updatedAt: number(),
70924
- data: RecordBodySchema
70925
- });
70926
- /** Declared index fields only. Anything else does not compile, by design. */
70927
- var RecordWhereSchema = record(RecordFieldPathSchema, union([
70928
- string(),
70929
- number(),
70930
- boolean(),
70931
- object({ in: array(union([
70932
- string(),
70933
- number(),
70934
- boolean()
70935
- ])).min(1).max(RECORD_BATCH_MAX) }),
70936
- object({
70937
- gt: union([string(), number()]).optional(),
70938
- gte: union([string(), number()]).optional(),
70939
- lt: union([string(), number()]).optional(),
70940
- lte: union([string(), number()]).optional()
70941
- }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
70942
- ]));
70943
- var KindShape = { kind: RecordKindNameSchema };
70944
- var TimeWindowShape = {
70945
- deviceId: number().int().optional(),
70946
- atFrom: number().optional(),
70947
- atTo: number().optional()
70948
- };
70949
- var RecordQueryInputSchema = object({
70950
- ...KindShape,
70951
- ...TimeWindowShape,
70952
- where: RecordWhereSchema.optional(),
70953
- /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
70954
- order: _enum(["at", "id"]).optional(),
70955
- desc: boolean().optional(),
70956
- limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
70957
- /** Opaque keyset cursor from a previous answer. There is no offset. */
70958
- cursor: string().min(1).optional()
70959
- });
70960
- var RecordQueryResultSchema = object({
70961
- records: array(RecordViewSchema),
70962
- nextCursor: string().nullable()
70963
- });
70964
- var RecordKindStateSchema = _enum([
70965
- "created",
70966
- "unchanged",
70967
- "updated"
70968
- ]);
70969
- var DeclareKindResultSchema = object({
70970
- kindId: number().int(),
70971
- state: RecordKindStateSchema,
70972
- createdIndexes: array(string())
70973
- });
70974
- /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
70975
- var SecretRefsList = array(string());
70976
- /**
70977
- * One op of a `transact`: the single-row writes, each on a kind of the caller.
70978
- * All ops of one call share ONE database file and ONE `transactFamily`.
70979
- */
70980
- var RecordTransactOpSchema = discriminatedUnion("op", [
70981
- object({
70982
- op: literal("put"),
70983
- kind: RecordKindNameSchema,
70984
- record: RecordInputSchema,
70985
- ifRev: number().int().min(0).optional()
70986
- }),
70987
- object({
70988
- op: literal("patch"),
70989
- kind: RecordKindNameSchema,
70990
- id: RecordIdSchema,
70991
- data: RecordBodySchema,
70992
- at: number().int().nullable().optional(),
70993
- expiresAt: number().int().nullable().optional(),
70994
- ifRev: number().int().min(1).optional()
70995
- }),
70996
- object({
70997
- op: literal("delete"),
70998
- kind: RecordKindNameSchema,
70999
- id: RecordIdSchema
71000
- })
71001
- ]);
71002
- var RecordSecretRefsSchema = record(string(), record(string(), string()));
71003
- method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
71004
- kind: "mutation",
71005
- auth: "admin"
71006
- }), method(object({
71007
- ...KindShape,
71008
- id: RecordIdSchema
71009
- }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
71010
- ...KindShape,
71011
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
71012
- }), array(RecordViewSchema), { auth: "admin" }), method(object({
71013
- ...KindShape,
71014
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
71015
- }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
71016
- ...KindShape,
71017
- record: RecordInputSchema,
71018
- /** Compare-and-set. `0` means "the row must not exist". */
71019
- ifRev: number().int().min(0).optional()
71020
- }), object({
71021
- rev: number().int(),
71022
- releasedRefs: SecretRefsList
71023
- }), {
71024
- kind: "mutation",
71025
- auth: "admin"
71026
- }), method(object({
71027
- ...KindShape,
71028
- records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
71029
- }), object({
71030
- count: number().int(),
71031
- releasedRefs: SecretRefsList
71032
- }), {
71033
- kind: "mutation",
71034
- auth: "admin"
71035
- }), method(object({
71036
- ...KindShape,
71037
- id: RecordIdSchema,
71038
- data: RecordBodySchema,
71039
- at: number().int().nullable().optional(),
71040
- expiresAt: number().int().nullable().optional(),
71041
- ifRev: number().int().min(1).optional()
71042
- }), object({
71043
- rev: number().int(),
71044
- releasedRefs: SecretRefsList
71045
- }), {
71046
- kind: "mutation",
71047
- auth: "admin"
71048
- }), method(object({
71049
- ...KindShape,
71050
- id: RecordIdSchema
71051
- }), object({
71052
- deleted: boolean(),
71053
- secretRefs: SecretRefsList
71054
- }), {
71055
- kind: "mutation",
71056
- auth: "admin"
71057
- }), method(object({
71058
- ...KindShape,
71059
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
71060
- }), object({
71061
- deleted: number().int(),
71062
- secretRefs: SecretRefsList
71063
- }), {
71064
- kind: "mutation",
71065
- auth: "admin"
71066
- }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
71067
- ...KindShape,
71068
- ...TimeWindowShape,
71069
- where: RecordWhereSchema.optional()
71070
- }), object({ count: number().int() }), { auth: "admin" }), method(object({
71071
- ...KindShape,
71072
- deviceId: number().int().optional(),
71073
- from: number(),
71074
- to: number(),
71075
- bucketMs: number().int().positive()
71076
- }), object({ buckets: array(object({
71077
- bucketStart: number(),
71078
- count: number().int()
71079
- })) }), { auth: "admin" }), method(object({
71080
- ...KindShape,
71081
- op: _enum([
71082
- "sum",
71083
- "min",
71084
- "max",
71085
- "count"
71086
- ]),
71087
- field: RecordFieldPathSchema.optional(),
71088
- groupBy: RecordFieldPathSchema.optional(),
71089
- where: RecordWhereSchema.optional()
71090
- }), object({ rows: array(object({
71091
- group: union([
71092
- string(),
71093
- number(),
71094
- _null()
71095
- ]),
71096
- value: number().nullable()
71097
- })) }), { auth: "admin" }), method(object({
71098
- ...KindShape,
71099
- deviceId: number().int().optional(),
71100
- atBefore: number().optional(),
71101
- where: RecordWhereSchema.optional()
71102
- }), object({
71103
- deleted: number().int(),
71104
- secretRefs: SecretRefsList
71105
- }), {
71106
- kind: "mutation",
71107
- auth: "admin"
71108
- }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
71109
- results: array(object({
71110
- rev: number().int().nullable(),
71111
- deleted: boolean()
71112
- })),
71113
- releasedRefs: SecretRefsList,
71114
- secretRefs: SecretRefsList
71115
- }), {
71116
- kind: "mutation",
71117
- auth: "admin"
71118
- }), method(object({
71119
- deviceId: number().int(),
71120
- kinds: array(RecordKindNameSchema).optional()
71121
- }), object({
71122
- deleted: record(string(), number().int()),
71123
- secretRefs: SecretRefsList
71124
- }), {
71125
- kind: "mutation",
71126
- auth: "admin"
71127
- }), method(object(KindShape), object({ id: number().int() }), {
71128
- kind: "mutation",
71129
- auth: "admin"
71130
- });
71131
- /**
71132
71221
  * record-entries - the ONE admin surface for every list of user-created entries
71133
71222
  * (D881): notification targets, brokers, LLM profiles, anything an addon
71134
71223
  * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
@@ -79765,20 +79854,6 @@ Object.freeze({
79765
79854
  access: "create",
79766
79855
  role: "viewer"
79767
79856
  },
79768
- "broker.add": {
79769
- capName: "broker",
79770
- capScope: "system",
79771
- addonId: null,
79772
- access: "create",
79773
- role: "admin"
79774
- },
79775
- "broker.get": {
79776
- capName: "broker",
79777
- capScope: "system",
79778
- addonId: null,
79779
- access: "view",
79780
- role: "admin"
79781
- },
79782
79857
  "broker.getBrokerConfig": {
79783
79858
  capName: "broker",
79784
79859
  capScope: "system",
@@ -79786,20 +79861,6 @@ Object.freeze({
79786
79861
  access: "view",
79787
79862
  role: "admin"
79788
79863
  },
79789
- "broker.getSettings": {
79790
- capName: "broker",
79791
- capScope: "system",
79792
- addonId: null,
79793
- access: "view",
79794
- role: "admin"
79795
- },
79796
- "broker.getSettingsSchema": {
79797
- capName: "broker",
79798
- capScope: "system",
79799
- addonId: null,
79800
- access: "view",
79801
- role: "admin"
79802
- },
79803
79864
  "broker.getState": {
79804
79865
  capName: "broker",
79805
79866
  capScope: "system",
@@ -79814,20 +79875,6 @@ Object.freeze({
79814
79875
  access: "view",
79815
79876
  role: "admin"
79816
79877
  },
79817
- "broker.list": {
79818
- capName: "broker",
79819
- capScope: "system",
79820
- addonId: null,
79821
- access: "view",
79822
- role: "admin"
79823
- },
79824
- "broker.listProviders": {
79825
- capName: "broker",
79826
- capScope: "system",
79827
- addonId: null,
79828
- access: "view",
79829
- role: "admin"
79830
- },
79831
79878
  "broker.publish": {
79832
79879
  capName: "broker",
79833
79880
  capScope: "system",
@@ -79835,20 +79882,6 @@ Object.freeze({
79835
79882
  access: "create",
79836
79883
  role: "admin"
79837
79884
  },
79838
- "broker.remove": {
79839
- capName: "broker",
79840
- capScope: "system",
79841
- addonId: null,
79842
- access: "delete",
79843
- role: "admin"
79844
- },
79845
- "broker.setSettings": {
79846
- capName: "broker",
79847
- capScope: "system",
79848
- addonId: null,
79849
- access: "create",
79850
- role: "admin"
79851
- },
79852
79885
  "broker.subscribe": {
79853
79886
  capName: "broker",
79854
79887
  capScope: "system",
@@ -79856,20 +79889,6 @@ Object.freeze({
79856
79889
  access: "create",
79857
79890
  role: "admin"
79858
79891
  },
79859
- "broker.testConnection": {
79860
- capName: "broker",
79861
- capScope: "system",
79862
- addonId: null,
79863
- access: "create",
79864
- role: "admin"
79865
- },
79866
- "broker.testSettings": {
79867
- capName: "broker",
79868
- capScope: "system",
79869
- addonId: null,
79870
- access: "create",
79871
- role: "admin"
79872
- },
79873
79892
  "broker.unsubscribe": {
79874
79893
  capName: "broker",
79875
79894
  capScope: "system",
@@ -84833,6 +84852,13 @@ Object.freeze({
84833
84852
  access: "view",
84834
84853
  role: "viewer"
84835
84854
  },
84855
+ "pipelineAnalytics.getMediaLocationCensus": {
84856
+ capName: "pipeline-analytics",
84857
+ capScope: "device",
84858
+ addonId: null,
84859
+ access: "view",
84860
+ role: "admin"
84861
+ },
84836
84862
  "pipelineAnalytics.getMediaReclaimStatus": {
84837
84863
  capName: "pipeline-analytics",
84838
84864
  capScope: "device",
@@ -95134,6 +95160,7 @@ object({
95134
95160
  delay: number().nonnegative().optional(),
95135
95161
  commands: record(string(), unknown())
95136
95162
  });
95163
+ entryBody({ brokerId: string() });
95137
95164
  //#endregion
95138
95165
  //#region src/migrations/drop-keys.ts
95139
95166
  /** The canonical settings table: one row per key, id `<addonId>.<key>`. */
@@ -98297,7 +98324,7 @@ var LoadShedController = class LoadShedController {
98297
98324
  * `0` = DISABLED by default — see the original field doc: a single slow
98298
98325
  * camera (e.g. an on-motion camera idling at <1 fps between motion events)
98299
98326
  * must NOT be detached or block new dispatches. `public` — also read by
98300
- * `index.ts`'s `globalSettingsSchema()` to seed the operator-facing form
98327
+ * `index.ts`'s `clusterSettingsSchema()` to seed the operator-facing form
98301
98328
  * field default (mirrors the original `PipelineOrchestratorAddon.DEFAULT_FPS_MIN_THRESHOLD`
98302
98329
  * cross-reference).
98303
98330
  */
@@ -117380,8 +117407,15 @@ var PipelineOrchestratorAddon = class PipelineOrchestratorAddon extends BaseAddo
117380
117407
  config
117381
117408
  }));
117382
117409
  }
117383
- /** Build the addon-level schema (cluster roles + balancer + failover). */
117384
- globalSettingsSchema() {
117410
+ scopedSettingsCapabilities() {
117411
+ return ["pipeline-orchestrator"];
117412
+ }
117413
+ /**
117414
+ * The cluster form (cluster roles, load balancer, cluster step models, detail crop, face
117415
+ * rescore, native lease, failover): every key is cluster-wide, stored `pipeline-orchestrator.<key>`.
117416
+ */
117417
+ async clusterSettingsSchema(cap) {
117418
+ if (cap !== "pipeline-orchestrator") return null;
117385
117419
  return this.schema({ sections: buildGlobalSettingsSections({ fpsMinThresholdDefault: LoadShedController.DEFAULT_FPS_MIN_THRESHOLD }) });
117386
117420
  }
117387
117421
  /** Build the device-level schema (per-camera detection wiring). */