@camstack/addon-post-analysis 1.2.669 → 1.2.671

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 (16) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{clip-model-registry-CbzBwacH.js → clip-model-registry-BhKHkBsg.js} +573 -547
  3. package/dist/{clip-model-registry-BPvijtCz.mjs → clip-model-registry-CDLYwWsU.mjs} +568 -548
  4. package/dist/embedding-encoder/index.js +1 -1
  5. package/dist/embedding-encoder/index.mjs +1 -1
  6. package/dist/pipeline-analytics/_stub.js +2 -2
  7. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-C4QK9e1e.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CRWJsnQv.mjs} +2 -2
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D0SgNf77.mjs +26 -0
  9. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DFMFx1IF.mjs +26 -0
  10. package/dist/pipeline-analytics/{hostInit-CPLvPO3K.mjs → hostInit-D503xVER.mjs} +2 -2
  11. package/dist/pipeline-analytics/index.js +252 -41
  12. package/dist/pipeline-analytics/index.mjs +252 -41
  13. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  14. package/package.json +2 -2
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-9HsFj_VL.mjs +0 -26
  16. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-anSYIl3S.mjs +0 -26
@@ -6038,7 +6038,7 @@ var ZodIssueCode = {
6038
6038
  var ZodFirstPartyTypeKind;
6039
6039
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6040
6040
  //#endregion
6041
- //#region ../types/dist/sleep-DEZaLbiu.mjs
6041
+ //#region ../types/dist/sleep-BX_MqzUe.mjs
6042
6042
  /**
6043
6043
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6044
6044
  * window to float samples (D455).
@@ -7618,6 +7618,28 @@ var SECRET_RETRY_MAX_MS = 5 * 6e4;
7618
7618
  /** Coalesces a burst of `keychain.changed` events into one re-resolve. */
7619
7619
  var SECRET_CHANGE_DEBOUNCE_MS = 250;
7620
7620
  /**
7621
+ * Pair a catalogue with the function that builds its ports FROM THE MIGRATION API. The one
7622
+ * place a catalogue is bound: a migration reaches nothing a ports binder cannot reach
7623
+ * through `api` (guard `check-migration-ports-surface`).
7624
+ */
7625
+ function migrationSet(catalogue, bindPorts) {
7626
+ return { bind: (api) => defineAddonMigrations(catalogue, bindPorts(api)) };
7627
+ }
7628
+ /** A mixed array is a mistake: the other kind would be dropped without a word. */
7629
+ function refuseMixed(form, kept, dropped) {
7630
+ 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`);
7631
+ }
7632
+ function catalogueOf(list) {
7633
+ const kept = list.filter((entry) => !("execute" in entry));
7634
+ refuseMixed("catalogue, (api) => ports", kept.length, list.length - kept.length);
7635
+ return kept;
7636
+ }
7637
+ function boundOf(list) {
7638
+ const kept = list.filter((entry) => "execute" in entry);
7639
+ refuseMixed("bound migrations", kept.length, list.length - kept.length);
7640
+ return kept;
7641
+ }
7642
+ /**
7621
7643
  * Base class for CamStack addons. Eliminates settings boilerplate:
7622
7644
  *
7623
7645
  * - Typed `config` property with automatic resolution from store + defaults
@@ -7784,23 +7806,21 @@ var BaseAddon = class {
7784
7806
  await this.loadScopedSchemas();
7785
7807
  return normalized;
7786
7808
  }
7809
+ async runMigrations(first, second, third) {
7810
+ if (typeof second === "function") return this.runMigrationSets([migrationSet(catalogueOf(first), second)], third);
7811
+ return this.runBound(boundOf(first), second);
7812
+ }
7787
7813
  /**
7788
- * Run this addon's migration catalogue (D987 M3) through the hub's `migrations`
7789
- * engine. Call it at the point of the boot where the data must already have the new
7790
- * shape — `onInitialize`, or `onRestoreDevices` for a migration that needs the
7791
- * restored devices — with the catalogue bound to the addon's ports
7792
- * (`defineAddonMigrations(ADDON_MIGRATIONS, ports)`).
7793
- *
7794
- * An engine that cannot be reached or refuses the catalogue is logged and runs
7795
- * nothing; the boot continues. A migration that FAILED (or was blocked by one)
7796
- * and declares `onFailure: 'block-owner'` makes this throw, so the addon does not
7797
- * serve data whose shape it cannot trust; `tolerate` migrations never do.
7798
- *
7799
- * ALWAYS pass the whole catalogue; a phase that must run only some of it passes
7800
- * `{ only: [ids] }` — never a filtered catalogue (the engine would judge the
7801
- * omitted applied ids "newer").
7814
+ * Several catalogues of ONE owner in one declaration (the engine replaces an owner's
7815
+ * catalogue on every declare, so two calls would each judge the other's ids "newer").
7816
+ * Build each entry with `migrationSet(catalogue, (api) => ports)`.
7802
7817
  */
7803
- async runMigrations(migrations, options) {
7818
+ async runMigrationSets(sets, options) {
7819
+ const api = this.ctx.migrationApi;
7820
+ if (api === void 0) throw new Error(`${this.ctx.id}: the migration API is not available on this context`);
7821
+ return this.runBound(sets.flatMap((set) => set.bind(api)), options);
7822
+ }
7823
+ async runBound(migrations, options) {
7804
7824
  const api = this.ctx.api.migrations;
7805
7825
  const report = await runAddonMigrations({
7806
7826
  declareOwner: (input) => api.declareOwner.mutate(input),
@@ -9205,6 +9225,20 @@ function defineRecordKinds(specs) {
9205
9225
  }
9206
9226
  return out;
9207
9227
  }
9228
+ /**
9229
+ * Entry kinds (D881): every list of user-created entries (notification
9230
+ * targets, brokers, LLM profiles) is ONE record kind with an id, a name and a
9231
+ * kind-specific body, and the admin UI lists/adds/edits/deletes all of them
9232
+ * through the `record-entries` capability with password fields derived from
9233
+ * the schema (`.meta({ secret: true })`).
9234
+ */
9235
+ /** The body of a plain entry: a name and the fields the kind adds. */
9236
+ function entryBody(shape) {
9237
+ return object({
9238
+ name: string().min(1),
9239
+ ...shape
9240
+ });
9241
+ }
9208
9242
  object({
9209
9243
  field: string().min(1),
9210
9244
  on: literal("advance")
@@ -14705,6 +14739,16 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
14705
14739
  precondition: PreconditionSchema
14706
14740
  })
14707
14741
  ])) });
14742
+ /** `JSON.stringify` with object keys sorted, so equal values spell the same. */
14743
+ function canonicalJson(value) {
14744
+ if (Array.isArray(value)) return `[${value.map((item) => canonicalJson(item)).join(",")}]`;
14745
+ if (typeof value === "object" && value !== null) return `{${Object.entries(value).filter(([, item]) => item !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, item]) => `${JSON.stringify(key)}:${canonicalJson(item)}`).join(",")}}`;
14746
+ return JSON.stringify(value) ?? "null";
14747
+ }
14748
+ /** The precondition string for a value a plan read (`null` when it read nothing). */
14749
+ function preconditionOf(value) {
14750
+ return canonicalJson(value ?? null);
14751
+ }
14708
14752
  /**
14709
14753
  * What a `procedure` body reports. `already-done` means the rerun observed the
14710
14754
  * work finished (a crash between the work and the ledger row, or a manual fix)
@@ -16223,6 +16267,39 @@ var UnstampedEventMediaCountSchema = object({
16223
16267
  /** Sum across both, or `null` when either lane could not be counted. */
16224
16268
  total: number().int().nonnegative().nullable()
16225
16269
  }).nullable();
16270
+ /**
16271
+ * Where the stored event media sits, per storage location: how many media rows
16272
+ * and how many bytes carry each location id, how many carry none (legacy,
16273
+ * resolved to the default `eventMedia` location), and how many name a location
16274
+ * that was not asked about (a deleted or never-listed one).
16275
+ *
16276
+ * One covering-index aggregate per asked location plus the NULL one, and one
16277
+ * unfiltered total that scans the covering index: O(rows), not a walk of the
16278
+ * rows themselves. `unlisted` is total minus the ASKED locations minus NULL, so
16279
+ * it is a deleted location only when every location id was asked.
16280
+ * `null` is "could not be measured", never zero.
16281
+ */
16282
+ var MediaLocationCensusInputSchema = object({ locationIds: array(string().min(1)).max(50).readonly() });
16283
+ var MediaLocationCensusSchema = object({
16284
+ locations: array(object({
16285
+ locationId: string(),
16286
+ rows: number().int().nonnegative(),
16287
+ bytes: number().nonnegative()
16288
+ })).readonly(),
16289
+ unstamped: object({
16290
+ rows: number().int().nonnegative(),
16291
+ bytes: number().nonnegative()
16292
+ }),
16293
+ /** Rows stamped with a location id that was not in the asked list. */
16294
+ unlisted: object({
16295
+ rows: number().int().nonnegative(),
16296
+ bytes: number().nonnegative()
16297
+ }),
16298
+ total: object({
16299
+ rows: number().int().nonnegative(),
16300
+ bytes: number().nonnegative()
16301
+ })
16302
+ });
16226
16303
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
16227
16304
  /** The independently selectable logical storage classes — every class
16228
16305
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -47802,52 +47879,7 @@ onBrightnessChanged: { data: object({
47802
47879
  minIntervalMs: 0
47803
47880
  } } }
47804
47881
  };
47805
- /**
47806
- * `broker` — unified pub/sub broker registry, system-scoped collection.
47807
- *
47808
- * The cap models any kind-tagged message broker the user wants to
47809
- * register and that other addons might consume. The first two kinds
47810
- * are MQTT (mosquitto / aedes embedded / cloud bridge) and
47811
- * Home Assistant (HA WebSocket — subscribe_entities + call_service).
47812
- * Future kinds (Zigbee2MQTT bridge, ZHA, KNX, Telegram, …) plug in
47813
- * the same surface.
47814
- *
47815
- * Why one cap, not one cap per kind:
47816
- * - The integrations page wants a single table of "every broker"
47817
- * across kinds; a unified cap drives it without join logic.
47818
- * - Generic admin operations (add / remove / test / status) are
47819
- * identical across kinds — duplicating them per cap was busywork.
47820
- * - The `network-access` cap precedent: same interface, many
47821
- * `providerKind: 'ingress'` implementations (Tailscale, ngrok, …).
47822
- *
47823
- * What stays kind-specific:
47824
- * - `getBrokerConfig` payload (kind decides whether it returns
47825
- * mqtt URL+creds, HA baseUrl+token, …) — typed as
47826
- * `Record<string, unknown>` at the wire; consumers narrow.
47827
- * - `publish` / `subscribe` / `getState` arguments (target / filter /
47828
- * key) — also typed as `Record<string, unknown>` so each kind can
47829
- * evolve its surface (MQTT topic+qos vs HA entity_id+domain)
47830
- * without rebreaking the cap signature.
47831
- * - `add` `settings` payload (different fields per kind, validated by
47832
- * the kind-specific provider).
47833
- *
47834
- * Bidirectionality:
47835
- * - `publish` is RPC — synchronous result (provider-defined).
47836
- * - `subscribe` returns a subscription handle; the actual message
47837
- * stream flows over the typed event-bus as `broker.message` events
47838
- * keyed by `(brokerId, subscriptionId)`. Consumers filter in their
47839
- * event handler. Subscriptions persist across reconnects — the
47840
- * provider re-subscribes upstream after a transport drop.
47841
- *
47842
- * Why event-bus push (not a subscription RPC stream):
47843
- * - Matches the rest of CamStack's D8 contract — events for telemetry,
47844
- * RPC for loss-is-a-bug. Broker messages are telemetry (a single
47845
- * drop is recoverable via `getState({key})`).
47846
- * - Frees `broker.subscribe` from holding a long-lived RPC channel.
47847
- * - Cross-process: events already route through `$event-bus`; no
47848
- * per-broker wire-shaping needed.
47849
- */
47850
- var BrokerStatusEnum = _enum([
47882
+ _enum([
47851
47883
  "connected",
47852
47884
  "disconnected",
47853
47885
  "connecting",
@@ -47855,141 +47887,12 @@ var BrokerStatusEnum = _enum([
47855
47887
  "unreachable",
47856
47888
  "error"
47857
47889
  ]);
47858
- var BrokerInfoSchema = object({
47859
- /** Stable broker id. Persisted; survives addon restarts. */
47860
- id: string(),
47861
- /** Addon id of the provider that OWNS this broker.
47862
- *
47863
- * The `broker` cap is a system-scoped collection: several addons
47864
- * register a `broker` provider, each owning a DISJOINT set of
47865
- * brokers (mqtt-broker owns `mqtt_*`, provider-homeassistant owns
47866
- * `ha_*`). A broker therefore belongs to exactly one addon — like a
47867
- * device belongs to one integration. The admin UI threads this id
47868
- * back as the `{ addonId }` system-collection selector on every
47869
- * id-keyed call (`get` / `getSettings` / `setSettings` / `remove` /
47870
- * `testConnection`), so the call routes to the OWNING provider
47871
- * instead of defaulting to the first-registered one. */
47872
- addonId: string(),
47873
- /** Human-readable name (operator-chosen at add-time). */
47874
- name: string(),
47875
- /** Provider-defined kind tag — `mqtt` / `home-assistant` / future. */
47876
- kind: string(),
47877
- status: BrokerStatusEnum,
47878
- /** Free-form provider-specific info (HA version, MQTT broker
47879
- * flavour, latency, mTLS active, …). */
47880
- info: record(string(), unknown()),
47881
- /** Ms epoch of the last connection probe / status update. */
47882
- lastCheckedAt: number().nullable(),
47883
- /** Last error message, when `status` indicates failure. */
47884
- error: string().nullable()
47885
- });
47886
47890
  var RegistryStatusSchema = object({
47887
47891
  brokerCount: number().int().nonnegative(),
47888
47892
  connectedCount: number().int().nonnegative()
47889
47893
  });
47890
- /**
47891
- * One entry per `broker` provider — which addon provides which broker
47892
- * kind(s). The unified create picker reads this to know, for each
47893
- * (addonId, kind) pair the operator can pick, where to route the
47894
- * follow-up `getSettingsSchema` / `testSettings` / `add` calls (via the
47895
- * `{ addonId }` selector). A provider only advertises a kind here when
47896
- * it implements `getSettingsSchema` for that kind (so the picker never
47897
- * offers a kind whose creation form can't be rendered).
47898
- */
47899
- var BrokerProviderInfoSchema = object({
47900
- /** Addon id of the `broker` provider this entry describes. */
47901
- addonId: string(),
47902
- /** Broker kinds this provider can create, with a display label. */
47903
- kinds: array(object({
47904
- kind: string(),
47905
- label: string(),
47906
- /**
47907
- * Relative hub path to start an interactive account link (OAuth popup).
47908
- * May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
47909
- */
47910
- interactiveConnectPath: string().min(1).optional(),
47911
- /** Relative hub path to disconnect the linked account (same popup pattern). */
47912
- interactiveDisconnectPath: string().min(1).optional(),
47913
- /**
47914
- * The kind signs in through a server-held interactive session instead of
47915
- * (or before) typed credentials. `basePath` is a hub-relative route set
47916
- * served by the owning addon (`/addon/<id>/...`) speaking the sign-in
47917
- * contract: `POST {basePath}/start` (body: the form's settings) answers
47918
- * `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
47919
- * `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
47920
- * 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
47921
- * (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
47922
- * existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
47923
- * (`{ sessionId }`) drops the session. The dialog that edits a broker
47924
- * offers it as the default path; the fields the session fills are
47925
- * marked `filledBySignIn` in the kind's settings schema.
47926
- *
47927
- * `methods` lists the ways the session can sign in, recommended first:
47928
- * `'device-code'` adds `POST {basePath}/code/start` (body: the form's
47929
- * settings) answering `{ sessionId, userCode, verificationUrl,
47930
- * expiresAt }` — the operator types `userCode` at `verificationUrl` on
47931
- * any device, and the same `status` / `commit` / `cancel` routes follow
47932
- * (status then carries `method`, `userCode`, `verificationUrl`,
47933
- * `expiresAt` and the phases `'awaiting-code'` / `'expired'`);
47934
- * `'proxy'` is the `{basePath}/start` flow above. Absent means
47935
- * `['proxy']`.
47936
- */
47937
- signIn: object({
47938
- basePath: string().min(1),
47939
- methods: array(_enum(["device-code", "proxy"])).optional()
47940
- }).optional()
47941
- }))
47942
- });
47943
- var ListInputSchema = object({
47944
- /** Optional kind filter — `list({kind:'home-assistant'})` returns
47945
- * only HA brokers. Omit to list every broker. */
47946
- kind: string().optional() });
47947
47894
  var GetInputSchema = object({ id: string() });
47948
- var AddInputSchema = object({
47949
- kind: string().min(1),
47950
- name: string().min(1),
47951
- /**
47952
- * ADOPT an existing id instead of minting a new one.
47953
- *
47954
- * Written the day this cost an outage. A broker's id is not a detail: HA
47955
- * devices carry it inside their `stableId` (`ha:ha_004:dev:…`), so a broker
47956
- * lost from config and re-added as `ha_001` leaves every one of its devices
47957
- * bound to a broker that no longer exists. Re-entering the password under the
47958
- * ORIGINAL id turns a multi-step device migration back into re-entering a
47959
- * password.
47960
- *
47961
- * A provider MUST refuse an id that is already in use — adopting a live
47962
- * broker's id would silently take it over.
47963
- */
47964
- id: string().min(1).optional(),
47965
- /** Kind-specific settings (e.g. MQTT `{url,username,password}` or HA
47966
- * `{baseUrl,accessToken}`). Validated by the kind-specific provider
47967
- * branch on receipt — invalid shape rejects the add. */
47968
- settings: record(string(), unknown())
47969
- });
47970
- var AddResultSchema = object({ id: string() });
47971
- var RemoveInputSchema = object({ id: string() });
47972
- var TestConnectionResultSchema = discriminatedUnion("ok", [object({
47973
- ok: literal(true),
47974
- latencyMs: number().nonnegative()
47975
- }), object({
47976
- ok: literal(false),
47977
- error: string()
47978
- })]);
47979
47895
  var SettingsRecordSchema$1 = record(string(), unknown());
47980
- var SettingsSchemaInputSchema = object({ kind: string() });
47981
- var TestSettingsInputSchema = object({
47982
- kind: string(),
47983
- settings: SettingsRecordSchema$1
47984
- });
47985
- var TestSettingsResultSchema = discriminatedUnion("ok", [object({
47986
- ok: literal(true),
47987
- latencyMs: number().nonnegative().optional()
47988
- }).strict(), object({
47989
- ok: literal(false),
47990
- error: string()
47991
- })]);
47992
- var SettingsSchemaResultSchema = unknown().nullable();
47993
47896
  var PublishInputSchema = object({
47994
47897
  brokerId: string(),
47995
47898
  /** Kind-specific routing target.
@@ -48023,25 +47926,7 @@ var GetStateInputSchema = object({
48023
47926
  * HA: entity_id (returns the cached entity state). */
48024
47927
  key: string()
48025
47928
  });
48026
- method(ListInputSchema, array(BrokerInfoSchema)), method(GetInputSchema, BrokerInfoSchema.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
48027
- kind: "mutation",
48028
- auth: "admin"
48029
- }), method(RemoveInputSchema, _void(), {
48030
- kind: "mutation",
48031
- auth: "admin"
48032
- }), method(GetInputSchema, TestConnectionResultSchema, {
48033
- kind: "mutation",
48034
- auth: "admin"
48035
- }), method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(object({
48036
- id: string(),
48037
- settings: SettingsRecordSchema$1
48038
- }), _void(), {
48039
- kind: "mutation",
48040
- auth: "admin"
48041
- }), method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(SettingsSchemaInputSchema, SettingsSchemaResultSchema, { auth: "admin" }), method(TestSettingsInputSchema, TestSettingsResultSchema, {
48042
- kind: "mutation",
48043
- auth: "admin"
48044
- }), method(PublishInputSchema, unknown(), {
47929
+ method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }), method(PublishInputSchema, unknown(), {
48045
47930
  kind: "mutation",
48046
47931
  auth: "admin"
48047
47932
  }), method(SubscribeInputSchema, SubscribeResultSchema, {
@@ -52912,7 +52797,14 @@ var DiscoveryCandidateSchema = object({
52912
52797
  /** `stableId` of the gateway candidate this device was found BEHIND. */
52913
52798
  parentStableId: string().optional(),
52914
52799
  /** `false` = shown for context but not pickable. Default true. */
52915
- selectable: boolean().optional()
52800
+ selectable: boolean().optional(),
52801
+ /**
52802
+ * Keys of the provider's creation form (`getChildCreationSchema`) this candidate
52803
+ * cannot be adopted without — a key for an encrypted board, a pairing code. The
52804
+ * admin asks for exactly these, on the creation form prefilled with
52805
+ * `prefilledConfig`, before it adopts. Absent or empty = adopt as it is.
52806
+ */
52807
+ needsParams: array(string()).optional()
52916
52808
  });
52917
52809
  /**
52918
52810
  * Flat device summary returned by `createDevice` / `adoptDiscoveredDevice`.
@@ -52971,12 +52863,24 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
52971
52863
  }), array(DiscoveryCandidateSchema), {
52972
52864
  kind: "mutation",
52973
52865
  auth: "admin"
52974
- }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
52866
+ }), method(object({}), CreationSchemaOutputSchema), method(object({
52867
+ /** The integration asked about; a provider whose integrations differ answers per one. */
52868
+ integrationId: string().optional() }), object({ deviceType: _enum(DeviceType).nullable() })), method(object({
52869
+ candidate: DiscoveryCandidateSchema,
52870
+ /** The integration the operator adopts into; a provider with several instances needs it. */
52871
+ integrationId: string().optional()
52872
+ }), DeviceSummarySchema, {
52975
52873
  kind: "mutation",
52976
52874
  auth: "admin"
52977
- }), method(object({}), boolean()), method(object({ type: _enum(DeviceType) }), CreationSchemaOutputSchema), method(object({
52875
+ }), method(object({}), boolean()), method(object({
52978
52876
  type: _enum(DeviceType),
52979
- config: record(string(), unknown())
52877
+ /** The integration asked about; a provider whose integrations differ answers per one. */
52878
+ integrationId: string().optional()
52879
+ }), CreationSchemaOutputSchema), method(object({
52880
+ type: _enum(DeviceType),
52881
+ config: record(string(), unknown()),
52882
+ /** The integration the operator adds the device to; a provider with several instances needs it. */
52883
+ integrationId: string().optional()
52980
52884
  }), DeviceSummarySchema, {
52981
52885
  kind: "mutation",
52982
52886
  auth: "admin"
@@ -53690,7 +53594,10 @@ method(object({
53690
53594
  auth: "admin"
53691
53595
  }), method(object({
53692
53596
  addonId: string(),
53693
- type: _enum(DeviceType)
53597
+ type: _enum(DeviceType),
53598
+ /** The integration the form is for; a provider whose integrations differ (a hub
53599
+ * integration takes no manual add) answers per integration. Absent = the addon's own. */
53600
+ integrationId: string().optional()
53694
53601
  }), unknown().nullable()), method(object({
53695
53602
  addonId: string(),
53696
53603
  type: _enum(DeviceType),
@@ -53774,7 +53681,11 @@ method(object({
53774
53681
  kind: "mutation",
53775
53682
  auth: "admin",
53776
53683
  timeoutMs: 12e4
53777
- }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
53684
+ }), method(object({
53685
+ addonId: string(),
53686
+ /** The integration the Add-Device dialog is open on; absent = the addon's own. */
53687
+ integrationId: string().optional()
53688
+ }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
53778
53689
  deviceId: number(),
53779
53690
  key: string(),
53780
53691
  value: unknown()
@@ -57197,7 +57108,7 @@ var TestConnectionStatusEnum = _enum([
57197
57108
  "inconclusive",
57198
57109
  "unsupported"
57199
57110
  ]);
57200
- var TestConnectionResultSchema$1 = object({
57111
+ var TestConnectionResultSchema = object({
57201
57112
  /** True ONLY for `validated`. Never true for a test that did not run. */
57202
57113
  success: boolean(),
57203
57114
  error: string().optional(),
@@ -57242,7 +57153,7 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
57242
57153
  }), method(_void(), array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(object({
57243
57154
  addonId: string(),
57244
57155
  settings: record(string(), unknown())
57245
- }), TestConnectionResultSchema$1, {
57156
+ }), TestConnectionResultSchema, {
57246
57157
  kind: "mutation",
57247
57158
  auth: "admin"
57248
57159
  });
@@ -57269,6 +57180,14 @@ var ConfigSchemaPassthrough$3 = custom();
57269
57180
  var IntegrationInstanceIdSchema = string().min(1);
57270
57181
  var IntegrationInstanceModeSchema = _enum(["single", "multiple"]);
57271
57182
  /**
57183
+ * What the addon's instances ARE for the Integrations page (planning#416). `devices`: each
57184
+ * instance is an integration that brings devices (the registry owns its on/off switch);
57185
+ * `services`: a connection configured from the addon's own function page, never listed on
57186
+ * Integrations.
57187
+ * It is the same vocabulary as the manifest's `integrationRole`, which stays as an override.
57188
+ */
57189
+ var IntegrationInstanceRoleSchema = _enum(["devices", "services"]);
57190
+ /**
57272
57191
  * One kind of instance a provider can create (an adapter, an account type). The sign-in and
57273
57192
  * connect fields follow the `broker` contract (`broker.cap.ts`): `signIn.basePath` is a
57274
57193
  * hub-relative route set speaking the sign-in contract, `connectPath` / `disconnectPath` open an
@@ -57279,6 +57198,22 @@ var IntegrationInstanceKindSchema = object({
57279
57198
  /** Stable id of the kind, sent back as `createInstance.kind`. */
57280
57199
  id: string().min(1),
57281
57200
  label: string().min(1),
57201
+ /**
57202
+ * The function capability this kind is configured for (`broker`, `smtp-provider`,
57203
+ * `device-provider`, ...). A page section is the kinds whose `functionCap` it names (D1013); a
57204
+ * provider with more than one section must name it on every kind.
57205
+ */
57206
+ functionCap: string().min(1),
57207
+ /**
57208
+ * For `functionCap: 'broker'`: the registry kind of the broker an instance of this kind is
57209
+ * (`matter`, `home-assistant`, ...). A caller that needs a broker of one kind (a link field)
57210
+ * finds the instances whose kind names it; absent takes the kind `id`.
57211
+ */
57212
+ brokerKind: string().min(1).optional(),
57213
+ /** What instances of this kind are for the Integrations page; absent takes the provider's `role`. */
57214
+ role: IntegrationInstanceRoleSchema.optional(),
57215
+ /** `testInstance` really probes the remote for this kind; absent takes the provider's `canTest`. */
57216
+ canTest: boolean().optional(),
57282
57217
  /** The kind signs in through a server-held interactive session. */
57283
57218
  signIn: object({
57284
57219
  basePath: string().min(1),
@@ -57291,11 +57226,7 @@ var IntegrationInstanceKindSchema = object({
57291
57226
  });
57292
57227
  var IntegrationInstanceDescriptionSchema = object({
57293
57228
  /** What the instances are for the Integrations page; see {@link IntegrationInstanceRoleSchema}. */
57294
- role: _enum([
57295
- "devices",
57296
- "services",
57297
- "both"
57298
- ]),
57229
+ role: IntegrationInstanceRoleSchema,
57299
57230
  /** How the devices of an instance are found; absent means `{ mode: 'none' }`. */
57300
57231
  discovery: object({
57301
57232
  mode: _enum([
@@ -57363,10 +57294,16 @@ var IntegrationInstancePatchSchema = object({
57363
57294
  /** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
57364
57295
  values: record(string(), unknown())
57365
57296
  });
57366
- 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({
57297
+ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({
57298
+ id: IntegrationInstanceIdSchema.nullable(),
57299
+ /** The kind of the create form (`id: null`) of a provider with several. */
57300
+ kind: string().min(1).optional()
57301
+ }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
57367
57302
  id: IntegrationInstanceIdSchema.optional(),
57368
57303
  name: string().min(1),
57369
- kind: string().min(1).optional()
57304
+ kind: string().min(1).optional(),
57305
+ /** Form values written with the record (a link picked in the create dialog). */
57306
+ values: record(string(), unknown()).optional()
57370
57307
  }), object({ id: string() }), {
57371
57308
  kind: "mutation",
57372
57309
  auth: "admin"
@@ -57384,8 +57321,10 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
57384
57321
  auth: "admin"
57385
57322
  }), optionalMethod(object({
57386
57323
  id: IntegrationInstanceIdSchema.nullable(),
57387
- values: record(string(), unknown())
57388
- }), TestConnectionResultSchema$1, {
57324
+ values: record(string(), unknown()),
57325
+ /** The kind to test when `id` is null and the provider has several. */
57326
+ kind: string().min(1).optional()
57327
+ }), TestConnectionResultSchema, {
57389
57328
  kind: "mutation",
57390
57329
  auth: "admin"
57391
57330
  });
@@ -60260,6 +60199,380 @@ var SystemMetricsSchema = object({
60260
60199
  gpuMemoryPercent: number().optional()
60261
60200
  });
60262
60201
  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);
60202
+ /**
60203
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
60204
+ * config documents, mirrors. The third storage API next to `ctx.settings`
60205
+ * (operator intent, D870) and device-history (numbers over time, D850).
60206
+ *
60207
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
60208
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
60209
+ * that with the addon id closed over). It is deliberately NOT in any input
60210
+ * schema, so a session can never supply it, and a call with no stamp is refused
60211
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
60212
+ * addons go through the owner's capability.
60213
+ *
60214
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
60215
+ * never `[]`. Secret fields are never on the wire: a read shows the
60216
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
60217
+ * resolves itself, and a write may carry only a keychain marker bound to the
60218
+ * row's own ref.
60219
+ *
60220
+ * Internal: addons reach it through `ctx.records`, never directly.
60221
+ */
60222
+ var RecordIdSchema = string().min(1).max(256);
60223
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
60224
+ var RecordBodySchema = record(string(), unknown());
60225
+ var RecordInputSchema = object({
60226
+ id: RecordIdSchema,
60227
+ /** The device this row belongs to (D865 removal, per-device reads). */
60228
+ deviceId: number().int().optional(),
60229
+ /** The domain clock, ms: observed / created / opened. */
60230
+ at: number().int().optional(),
60231
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
60232
+ expiresAt: number().int().optional(),
60233
+ data: RecordBodySchema
60234
+ });
60235
+ var RecordViewSchema = object({
60236
+ id: string(),
60237
+ deviceId: number().int().nullable(),
60238
+ at: number().nullable(),
60239
+ expiresAt: number().nullable(),
60240
+ rev: number().int(),
60241
+ updatedAt: number(),
60242
+ data: RecordBodySchema
60243
+ });
60244
+ /** Declared index fields only. Anything else does not compile, by design. */
60245
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
60246
+ string(),
60247
+ number(),
60248
+ boolean(),
60249
+ object({ in: array(union([
60250
+ string(),
60251
+ number(),
60252
+ boolean()
60253
+ ])).min(1).max(RECORD_BATCH_MAX) }),
60254
+ object({
60255
+ gt: union([string(), number()]).optional(),
60256
+ gte: union([string(), number()]).optional(),
60257
+ lt: union([string(), number()]).optional(),
60258
+ lte: union([string(), number()]).optional()
60259
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
60260
+ ]));
60261
+ var KindShape = { kind: RecordKindNameSchema };
60262
+ var TimeWindowShape = {
60263
+ deviceId: number().int().optional(),
60264
+ atFrom: number().optional(),
60265
+ atTo: number().optional()
60266
+ };
60267
+ var RecordQueryInputSchema = object({
60268
+ ...KindShape,
60269
+ ...TimeWindowShape,
60270
+ where: RecordWhereSchema.optional(),
60271
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
60272
+ order: _enum(["at", "id"]).optional(),
60273
+ desc: boolean().optional(),
60274
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
60275
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
60276
+ cursor: string().min(1).optional()
60277
+ });
60278
+ var RecordQueryResultSchema = object({
60279
+ records: array(RecordViewSchema),
60280
+ nextCursor: string().nullable()
60281
+ });
60282
+ var RecordKindStateSchema = _enum([
60283
+ "created",
60284
+ "unchanged",
60285
+ "updated"
60286
+ ]);
60287
+ var DeclareKindResultSchema = object({
60288
+ kindId: number().int(),
60289
+ state: RecordKindStateSchema,
60290
+ createdIndexes: array(string())
60291
+ });
60292
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
60293
+ var SecretRefsList = array(string());
60294
+ /**
60295
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
60296
+ * All ops of one call share ONE database file and ONE `transactFamily`.
60297
+ */
60298
+ var RecordTransactOpSchema = discriminatedUnion("op", [
60299
+ object({
60300
+ op: literal("put"),
60301
+ kind: RecordKindNameSchema,
60302
+ record: RecordInputSchema,
60303
+ ifRev: number().int().min(0).optional()
60304
+ }),
60305
+ object({
60306
+ op: literal("patch"),
60307
+ kind: RecordKindNameSchema,
60308
+ id: RecordIdSchema,
60309
+ data: RecordBodySchema,
60310
+ at: number().int().nullable().optional(),
60311
+ expiresAt: number().int().nullable().optional(),
60312
+ ifRev: number().int().min(1).optional()
60313
+ }),
60314
+ object({
60315
+ op: literal("delete"),
60316
+ kind: RecordKindNameSchema,
60317
+ id: RecordIdSchema
60318
+ })
60319
+ ]);
60320
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
60321
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
60322
+ kind: "mutation",
60323
+ auth: "admin"
60324
+ }), method(object({
60325
+ ...KindShape,
60326
+ id: RecordIdSchema
60327
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
60328
+ ...KindShape,
60329
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
60330
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
60331
+ ...KindShape,
60332
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
60333
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
60334
+ ...KindShape,
60335
+ record: RecordInputSchema,
60336
+ /** Compare-and-set. `0` means "the row must not exist". */
60337
+ ifRev: number().int().min(0).optional()
60338
+ }), object({
60339
+ rev: number().int(),
60340
+ releasedRefs: SecretRefsList
60341
+ }), {
60342
+ kind: "mutation",
60343
+ auth: "admin"
60344
+ }), method(object({
60345
+ ...KindShape,
60346
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
60347
+ }), object({
60348
+ count: number().int(),
60349
+ releasedRefs: SecretRefsList
60350
+ }), {
60351
+ kind: "mutation",
60352
+ auth: "admin"
60353
+ }), method(object({
60354
+ ...KindShape,
60355
+ id: RecordIdSchema,
60356
+ data: RecordBodySchema,
60357
+ at: number().int().nullable().optional(),
60358
+ expiresAt: number().int().nullable().optional(),
60359
+ ifRev: number().int().min(1).optional()
60360
+ }), object({
60361
+ rev: number().int(),
60362
+ releasedRefs: SecretRefsList
60363
+ }), {
60364
+ kind: "mutation",
60365
+ auth: "admin"
60366
+ }), method(object({
60367
+ ...KindShape,
60368
+ id: RecordIdSchema
60369
+ }), object({
60370
+ deleted: boolean(),
60371
+ secretRefs: SecretRefsList
60372
+ }), {
60373
+ kind: "mutation",
60374
+ auth: "admin"
60375
+ }), method(object({
60376
+ ...KindShape,
60377
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
60378
+ }), object({
60379
+ deleted: number().int(),
60380
+ secretRefs: SecretRefsList
60381
+ }), {
60382
+ kind: "mutation",
60383
+ auth: "admin"
60384
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
60385
+ ...KindShape,
60386
+ ...TimeWindowShape,
60387
+ where: RecordWhereSchema.optional()
60388
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
60389
+ ...KindShape,
60390
+ deviceId: number().int().optional(),
60391
+ from: number(),
60392
+ to: number(),
60393
+ bucketMs: number().int().positive()
60394
+ }), object({ buckets: array(object({
60395
+ bucketStart: number(),
60396
+ count: number().int()
60397
+ })) }), { auth: "admin" }), method(object({
60398
+ ...KindShape,
60399
+ op: _enum([
60400
+ "sum",
60401
+ "min",
60402
+ "max",
60403
+ "count"
60404
+ ]),
60405
+ field: RecordFieldPathSchema.optional(),
60406
+ groupBy: RecordFieldPathSchema.optional(),
60407
+ where: RecordWhereSchema.optional()
60408
+ }), object({ rows: array(object({
60409
+ group: union([
60410
+ string(),
60411
+ number(),
60412
+ _null()
60413
+ ]),
60414
+ value: number().nullable()
60415
+ })) }), { auth: "admin" }), method(object({
60416
+ ...KindShape,
60417
+ deviceId: number().int().optional(),
60418
+ atBefore: number().optional(),
60419
+ where: RecordWhereSchema.optional()
60420
+ }), object({
60421
+ deleted: number().int(),
60422
+ secretRefs: SecretRefsList
60423
+ }), {
60424
+ kind: "mutation",
60425
+ auth: "admin"
60426
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
60427
+ results: array(object({
60428
+ rev: number().int().nullable(),
60429
+ deleted: boolean()
60430
+ })),
60431
+ releasedRefs: SecretRefsList,
60432
+ secretRefs: SecretRefsList
60433
+ }), {
60434
+ kind: "mutation",
60435
+ auth: "admin"
60436
+ }), method(object({
60437
+ deviceId: number().int(),
60438
+ kinds: array(RecordKindNameSchema).optional()
60439
+ }), object({
60440
+ deleted: record(string(), number().int()),
60441
+ secretRefs: SecretRefsList
60442
+ }), {
60443
+ kind: "mutation",
60444
+ auth: "admin"
60445
+ }), method(object(KindShape), object({ id: number().int() }), {
60446
+ kind: "mutation",
60447
+ auth: "admin"
60448
+ });
60449
+ /**
60450
+ * The wire shapes of the migration API, version 1 (planning#447).
60451
+ *
60452
+ * A migration is code that outlives the server it was written against: an addon at
60453
+ * version 1.4 that is brought to 1.9 in one jump still runs its 1.4 catalogue, against
60454
+ * the 1.9 kernel. The only thing that code may call is {@link MigrationApiV1}; this file
60455
+ * is the contract of every method of it, one Zod pair per method.
60456
+ *
60457
+ * APPEND-ONLY. A released method is never removed and never changes meaning: an input
60458
+ * field is never removed or made required, an enum never narrows, an output field is
60459
+ * never removed. A change that cannot be expressed that way is `migration-api.v2`, next
60460
+ * to this file. `scripts/check-migration-api-append-only.ts` holds the line against
60461
+ * `scripts/migration-api-contract.json`, and every `behaviours` id below must have an
60462
+ * `it('<id>'` in `migration-api.contract.spec.ts`.
60463
+ */
60464
+ var Rows = record(string(), unknown());
60465
+ var IntegrationId = object({ integrationId: string().min(1) });
60466
+ var RecordId = object({ id: string().min(1) });
60467
+ var RecordRowSchema = object({
60468
+ id: string(),
60469
+ deviceId: number().int().nullable(),
60470
+ at: number().nullable(),
60471
+ expiresAt: number().nullable(),
60472
+ rev: number().int(),
60473
+ updatedAt: number(),
60474
+ data: Rows
60475
+ });
60476
+ var RecordPutShape = {
60477
+ id: string().min(1),
60478
+ deviceId: number().int().optional(),
60479
+ at: number().int().optional(),
60480
+ expiresAt: number().int().optional(),
60481
+ data: Rows
60482
+ };
60483
+ var MigrationIntegrationSchema = object({
60484
+ id: string(),
60485
+ addonId: string(),
60486
+ name: string(),
60487
+ info: Rows,
60488
+ originStableId: string().optional()
60489
+ });
60490
+ var MigrationDeviceSchema = object({
60491
+ id: number().int(),
60492
+ integrationId: string().nullable().optional(),
60493
+ /** The owning device; null or absent for a root. */
60494
+ parentDeviceId: number().int().nullable().optional(),
60495
+ type: string().optional(),
60496
+ name: string().optional(),
60497
+ stableId: string().optional()
60498
+ });
60499
+ /** What the engine says about the migration API it serves: lets an addon notice an older server. */
60500
+ var MigrationApiInfoSchema = object({
60501
+ version: number().int(),
60502
+ methods: array(string())
60503
+ });
60504
+ object({
60505
+ message: string(),
60506
+ meta: Rows.optional(),
60507
+ /** Grouping tags of the line; a line about a device carries `{ deviceId }`. */
60508
+ tags: object({ deviceId: number().int().optional() }).optional()
60509
+ });
60510
+ object({
60511
+ owner: string().min(1),
60512
+ metas: array(MigrationMetaSchema)
60513
+ }), object({
60514
+ bootId: string(),
60515
+ snapshot: _enum([
60516
+ "none",
60517
+ "written",
60518
+ "refused"
60519
+ ]),
60520
+ steps: array(MigrationOwnerStepSchema),
60521
+ /** The migration API the engine serves; absent from a server that predates it. */
60522
+ migrationApi: MigrationApiInfoSchema.optional()
60523
+ }), object({ id: string().min(1) }), object({
60524
+ proceed: boolean(),
60525
+ state: union([literal("pending"), MigrationStatusSchema]),
60526
+ reason: string().nullable()
60527
+ }), object({
60528
+ id: string().min(1),
60529
+ result: MigrationOwnerResultSchema
60530
+ }), object({
60531
+ status: MigrationStatusSchema,
60532
+ error: string().nullable(),
60533
+ rowsChanged: number().int().nonnegative()
60534
+ }), object({
60535
+ rows: number().int().nonnegative(),
60536
+ secrets: number().int().nonnegative()
60537
+ }), IntegrationId.extend({ patch: Rows }), object({ written: boolean() }), IntegrationId.extend({ keys: array(string().min(1)) }), object({
60538
+ present: boolean(),
60539
+ removed: Rows
60540
+ }), RecordRowSchema.nullable(), RecordRowSchema.nullable(), object({
60541
+ ...RecordPutShape,
60542
+ ifRev: number().int().optional()
60543
+ }), object({ rev: number().int() }), object({ records: array(object(RecordPutShape)) }), object({ count: number().int().nonnegative() }), RecordId.extend({
60544
+ partial: Rows,
60545
+ ifRev: number().int().optional()
60546
+ }), object({ rev: number().int() }), object({ deleted: boolean() }), object({
60547
+ deviceId: number().int().optional(),
60548
+ atFrom: number().optional(),
60549
+ atTo: number().optional(),
60550
+ where: RecordWhereSchema.optional(),
60551
+ limit: number().int().min(1).optional(),
60552
+ cursor: string().min(1).optional(),
60553
+ resolveSecrets: boolean().optional()
60554
+ }), object({
60555
+ records: array(RecordRowSchema),
60556
+ nextCursor: string().nullable()
60557
+ }), object({
60558
+ deviceId: number().int().optional(),
60559
+ atBefore: number().optional(),
60560
+ where: RecordWhereSchema.optional()
60561
+ }), 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({
60562
+ ref: string().min(1),
60563
+ value: string()
60564
+ }), object({}), object({ refs: array(string()) }), object({ deleted: number().int().nonnegative() }), object({}), object({ integrations: array(MigrationIntegrationSchema) }), object({ id: string().min(1) }), MigrationIntegrationSchema.nullable(), object({
60565
+ addonId: string().min(1),
60566
+ integrationId: string().min(1).optional()
60567
+ }), object({ devices: array(MigrationDeviceSchema) }), object({ deviceId: number().int() }), object({
60568
+ id: number().int(),
60569
+ integrationId: string().nullable(),
60570
+ /** Whether the device carries any stored config; its content is not offered. */
60571
+ hasConfig: boolean()
60572
+ }).nullable(), object({
60573
+ deviceId: number().int(),
60574
+ integrationId: string().min(1)
60575
+ }), object({}), object({}), object({ nodeId: string() }), object({}), object({});
60263
60576
  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({
60264
60577
  id: string().min(1),
60265
60578
  error: string().min(1)
@@ -60289,7 +60602,9 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
60289
60602
  "written",
60290
60603
  "refused"
60291
60604
  ]),
60292
- steps: array(MigrationOwnerStepSchema)
60605
+ steps: array(MigrationOwnerStepSchema),
60606
+ /** The migration API this engine serves (additive: a server that predates it omits it). */
60607
+ migrationApi: MigrationApiInfoSchema.optional()
60293
60608
  }), {
60294
60609
  kind: "mutation",
60295
60610
  auth: "admin"
@@ -63441,6 +63756,20 @@ var pipelineAnalyticsCapability = {
63441
63756
  */
63442
63757
  countUnstampedEventMedia: method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }),
63443
63758
  /**
63759
+ * Stored media per storage location: rows and bytes stamped with each asked
63760
+ * location id, the rows with none, and the rows naming a location that was
63761
+ * not asked about. One indexed aggregate per location (`idx_media_location_size`,
63762
+ * a covering index) plus the NULL one, and one unfiltered total that is a
63763
+ * covering-index scan: O(rows), cheap per row but not constant, so a hub with
63764
+ * millions of rows pays for it once per call. `unlisted` is relative to the
63765
+ * ids ASKED: it means "gone" only when every location id was asked. A failed
63766
+ * read throws; it never reads as zero.
63767
+ */
63768
+ getMediaLocationCensus: method(MediaLocationCensusInputSchema, MediaLocationCensusSchema, {
63769
+ kind: "query",
63770
+ auth: "admin"
63771
+ }),
63772
+ /**
63444
63773
  * How many rows a pass would STILL act on against `toLocationId`.
63445
63774
  *
63446
63775
  * One derivation, two consumers: it is the media lane's denominator (the
@@ -66520,7 +66849,7 @@ var BrokerStatusSchema$1 = _enum([
66520
66849
  "unreachable",
66521
66850
  "tls-error"
66522
66851
  ]);
66523
- var BrokerInfoSchema$1 = object({
66852
+ var BrokerInfoSchema = object({
66524
66853
  id: string(),
66525
66854
  name: string(),
66526
66855
  url: string(),
@@ -66583,7 +66912,7 @@ var StatusSchema = object({
66583
66912
  brokerCount: number(),
66584
66913
  embeddedRunning: boolean()
66585
66914
  });
66586
- method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
66915
+ method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
66587
66916
  kind: "mutation",
66588
66917
  auth: "admin"
66589
66918
  }), method(IdInputSchema, _void(), {
@@ -74716,253 +75045,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, DeviceType.Gateway, met
74716
75045
  auth: "admin"
74717
75046
  });
74718
75047
  /**
74719
- * records - an addon's own facts and documents (D881): ledgers, audit rows,
74720
- * config documents, mirrors. The third storage API next to `ctx.settings`
74721
- * (operator intent, D870) and device-history (numbers over time, D850).
74722
- *
74723
- * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
74724
- * crossed a process and stated by a hub in-process caller (`ctx.records` does
74725
- * that with the addon id closed over). It is deliberately NOT in any input
74726
- * schema, so a session can never supply it, and a call with no stamp is refused
74727
- * `records/no-caller`. A kind is readable and writable only by its owner; other
74728
- * addons go through the owner's capability.
74729
- *
74730
- * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
74731
- * never `[]`. Secret fields are never on the wire: a read shows the
74732
- * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
74733
- * resolves itself, and a write may carry only a keychain marker bound to the
74734
- * row's own ref.
74735
- *
74736
- * Internal: addons reach it through `ctx.records`, never directly.
74737
- */
74738
- var RecordIdSchema = string().min(1).max(256);
74739
- /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
74740
- var RecordBodySchema = record(string(), unknown());
74741
- var RecordInputSchema = object({
74742
- id: RecordIdSchema,
74743
- /** The device this row belongs to (D865 removal, per-device reads). */
74744
- deviceId: number().int().optional(),
74745
- /** The domain clock, ms: observed / created / opened. */
74746
- at: number().int().optional(),
74747
- /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
74748
- expiresAt: number().int().optional(),
74749
- data: RecordBodySchema
74750
- });
74751
- var RecordViewSchema = object({
74752
- id: string(),
74753
- deviceId: number().int().nullable(),
74754
- at: number().nullable(),
74755
- expiresAt: number().nullable(),
74756
- rev: number().int(),
74757
- updatedAt: number(),
74758
- data: RecordBodySchema
74759
- });
74760
- /** Declared index fields only. Anything else does not compile, by design. */
74761
- var RecordWhereSchema = record(RecordFieldPathSchema, union([
74762
- string(),
74763
- number(),
74764
- boolean(),
74765
- object({ in: array(union([
74766
- string(),
74767
- number(),
74768
- boolean()
74769
- ])).min(1).max(RECORD_BATCH_MAX) }),
74770
- object({
74771
- gt: union([string(), number()]).optional(),
74772
- gte: union([string(), number()]).optional(),
74773
- lt: union([string(), number()]).optional(),
74774
- lte: union([string(), number()]).optional()
74775
- }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
74776
- ]));
74777
- var KindShape = { kind: RecordKindNameSchema };
74778
- var TimeWindowShape = {
74779
- deviceId: number().int().optional(),
74780
- atFrom: number().optional(),
74781
- atTo: number().optional()
74782
- };
74783
- var RecordQueryInputSchema = object({
74784
- ...KindShape,
74785
- ...TimeWindowShape,
74786
- where: RecordWhereSchema.optional(),
74787
- /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
74788
- order: _enum(["at", "id"]).optional(),
74789
- desc: boolean().optional(),
74790
- limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
74791
- /** Opaque keyset cursor from a previous answer. There is no offset. */
74792
- cursor: string().min(1).optional()
74793
- });
74794
- var RecordQueryResultSchema = object({
74795
- records: array(RecordViewSchema),
74796
- nextCursor: string().nullable()
74797
- });
74798
- var RecordKindStateSchema = _enum([
74799
- "created",
74800
- "unchanged",
74801
- "updated"
74802
- ]);
74803
- var DeclareKindResultSchema = object({
74804
- kindId: number().int(),
74805
- state: RecordKindStateSchema,
74806
- createdIndexes: array(string())
74807
- });
74808
- /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
74809
- var SecretRefsList = array(string());
74810
- /**
74811
- * One op of a `transact`: the single-row writes, each on a kind of the caller.
74812
- * All ops of one call share ONE database file and ONE `transactFamily`.
74813
- */
74814
- var RecordTransactOpSchema = discriminatedUnion("op", [
74815
- object({
74816
- op: literal("put"),
74817
- kind: RecordKindNameSchema,
74818
- record: RecordInputSchema,
74819
- ifRev: number().int().min(0).optional()
74820
- }),
74821
- object({
74822
- op: literal("patch"),
74823
- kind: RecordKindNameSchema,
74824
- id: RecordIdSchema,
74825
- data: RecordBodySchema,
74826
- at: number().int().nullable().optional(),
74827
- expiresAt: number().int().nullable().optional(),
74828
- ifRev: number().int().min(1).optional()
74829
- }),
74830
- object({
74831
- op: literal("delete"),
74832
- kind: RecordKindNameSchema,
74833
- id: RecordIdSchema
74834
- })
74835
- ]);
74836
- var RecordSecretRefsSchema = record(string(), record(string(), string()));
74837
- method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
74838
- kind: "mutation",
74839
- auth: "admin"
74840
- }), method(object({
74841
- ...KindShape,
74842
- id: RecordIdSchema
74843
- }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
74844
- ...KindShape,
74845
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
74846
- }), array(RecordViewSchema), { auth: "admin" }), method(object({
74847
- ...KindShape,
74848
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
74849
- }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
74850
- ...KindShape,
74851
- record: RecordInputSchema,
74852
- /** Compare-and-set. `0` means "the row must not exist". */
74853
- ifRev: number().int().min(0).optional()
74854
- }), object({
74855
- rev: number().int(),
74856
- releasedRefs: SecretRefsList
74857
- }), {
74858
- kind: "mutation",
74859
- auth: "admin"
74860
- }), method(object({
74861
- ...KindShape,
74862
- records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
74863
- }), object({
74864
- count: number().int(),
74865
- releasedRefs: SecretRefsList
74866
- }), {
74867
- kind: "mutation",
74868
- auth: "admin"
74869
- }), method(object({
74870
- ...KindShape,
74871
- id: RecordIdSchema,
74872
- data: RecordBodySchema,
74873
- at: number().int().nullable().optional(),
74874
- expiresAt: number().int().nullable().optional(),
74875
- ifRev: number().int().min(1).optional()
74876
- }), object({
74877
- rev: number().int(),
74878
- releasedRefs: SecretRefsList
74879
- }), {
74880
- kind: "mutation",
74881
- auth: "admin"
74882
- }), method(object({
74883
- ...KindShape,
74884
- id: RecordIdSchema
74885
- }), object({
74886
- deleted: boolean(),
74887
- secretRefs: SecretRefsList
74888
- }), {
74889
- kind: "mutation",
74890
- auth: "admin"
74891
- }), method(object({
74892
- ...KindShape,
74893
- ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
74894
- }), object({
74895
- deleted: number().int(),
74896
- secretRefs: SecretRefsList
74897
- }), {
74898
- kind: "mutation",
74899
- auth: "admin"
74900
- }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
74901
- ...KindShape,
74902
- ...TimeWindowShape,
74903
- where: RecordWhereSchema.optional()
74904
- }), object({ count: number().int() }), { auth: "admin" }), method(object({
74905
- ...KindShape,
74906
- deviceId: number().int().optional(),
74907
- from: number(),
74908
- to: number(),
74909
- bucketMs: number().int().positive()
74910
- }), object({ buckets: array(object({
74911
- bucketStart: number(),
74912
- count: number().int()
74913
- })) }), { auth: "admin" }), method(object({
74914
- ...KindShape,
74915
- op: _enum([
74916
- "sum",
74917
- "min",
74918
- "max",
74919
- "count"
74920
- ]),
74921
- field: RecordFieldPathSchema.optional(),
74922
- groupBy: RecordFieldPathSchema.optional(),
74923
- where: RecordWhereSchema.optional()
74924
- }), object({ rows: array(object({
74925
- group: union([
74926
- string(),
74927
- number(),
74928
- _null()
74929
- ]),
74930
- value: number().nullable()
74931
- })) }), { auth: "admin" }), method(object({
74932
- ...KindShape,
74933
- deviceId: number().int().optional(),
74934
- atBefore: number().optional(),
74935
- where: RecordWhereSchema.optional()
74936
- }), object({
74937
- deleted: number().int(),
74938
- secretRefs: SecretRefsList
74939
- }), {
74940
- kind: "mutation",
74941
- auth: "admin"
74942
- }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
74943
- results: array(object({
74944
- rev: number().int().nullable(),
74945
- deleted: boolean()
74946
- })),
74947
- releasedRefs: SecretRefsList,
74948
- secretRefs: SecretRefsList
74949
- }), {
74950
- kind: "mutation",
74951
- auth: "admin"
74952
- }), method(object({
74953
- deviceId: number().int(),
74954
- kinds: array(RecordKindNameSchema).optional()
74955
- }), object({
74956
- deleted: record(string(), number().int()),
74957
- secretRefs: SecretRefsList
74958
- }), {
74959
- kind: "mutation",
74960
- auth: "admin"
74961
- }), method(object(KindShape), object({ id: number().int() }), {
74962
- kind: "mutation",
74963
- auth: "admin"
74964
- });
74965
- /**
74966
75048
  * record-entries - the ONE admin surface for every list of user-created entries
74967
75049
  * (D881): notification targets, brokers, LLM profiles, anything an addon
74968
75050
  * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
@@ -85797,20 +85879,6 @@ Object.freeze({
85797
85879
  access: "create",
85798
85880
  role: "viewer"
85799
85881
  },
85800
- "broker.add": {
85801
- capName: "broker",
85802
- capScope: "system",
85803
- addonId: null,
85804
- access: "create",
85805
- role: "admin"
85806
- },
85807
- "broker.get": {
85808
- capName: "broker",
85809
- capScope: "system",
85810
- addonId: null,
85811
- access: "view",
85812
- role: "admin"
85813
- },
85814
85882
  "broker.getBrokerConfig": {
85815
85883
  capName: "broker",
85816
85884
  capScope: "system",
@@ -85818,20 +85886,6 @@ Object.freeze({
85818
85886
  access: "view",
85819
85887
  role: "admin"
85820
85888
  },
85821
- "broker.getSettings": {
85822
- capName: "broker",
85823
- capScope: "system",
85824
- addonId: null,
85825
- access: "view",
85826
- role: "admin"
85827
- },
85828
- "broker.getSettingsSchema": {
85829
- capName: "broker",
85830
- capScope: "system",
85831
- addonId: null,
85832
- access: "view",
85833
- role: "admin"
85834
- },
85835
85889
  "broker.getState": {
85836
85890
  capName: "broker",
85837
85891
  capScope: "system",
@@ -85846,20 +85900,6 @@ Object.freeze({
85846
85900
  access: "view",
85847
85901
  role: "admin"
85848
85902
  },
85849
- "broker.list": {
85850
- capName: "broker",
85851
- capScope: "system",
85852
- addonId: null,
85853
- access: "view",
85854
- role: "admin"
85855
- },
85856
- "broker.listProviders": {
85857
- capName: "broker",
85858
- capScope: "system",
85859
- addonId: null,
85860
- access: "view",
85861
- role: "admin"
85862
- },
85863
85903
  "broker.publish": {
85864
85904
  capName: "broker",
85865
85905
  capScope: "system",
@@ -85867,20 +85907,6 @@ Object.freeze({
85867
85907
  access: "create",
85868
85908
  role: "admin"
85869
85909
  },
85870
- "broker.remove": {
85871
- capName: "broker",
85872
- capScope: "system",
85873
- addonId: null,
85874
- access: "delete",
85875
- role: "admin"
85876
- },
85877
- "broker.setSettings": {
85878
- capName: "broker",
85879
- capScope: "system",
85880
- addonId: null,
85881
- access: "create",
85882
- role: "admin"
85883
- },
85884
85910
  "broker.subscribe": {
85885
85911
  capName: "broker",
85886
85912
  capScope: "system",
@@ -85888,20 +85914,6 @@ Object.freeze({
85888
85914
  access: "create",
85889
85915
  role: "admin"
85890
85916
  },
85891
- "broker.testConnection": {
85892
- capName: "broker",
85893
- capScope: "system",
85894
- addonId: null,
85895
- access: "create",
85896
- role: "admin"
85897
- },
85898
- "broker.testSettings": {
85899
- capName: "broker",
85900
- capScope: "system",
85901
- addonId: null,
85902
- access: "create",
85903
- role: "admin"
85904
- },
85905
85917
  "broker.unsubscribe": {
85906
85918
  capName: "broker",
85907
85919
  capScope: "system",
@@ -90865,6 +90877,13 @@ Object.freeze({
90865
90877
  access: "view",
90866
90878
  role: "viewer"
90867
90879
  },
90880
+ "pipelineAnalytics.getMediaLocationCensus": {
90881
+ capName: "pipeline-analytics",
90882
+ capScope: "device",
90883
+ addonId: null,
90884
+ access: "view",
90885
+ role: "admin"
90886
+ },
90868
90887
  "pipelineAnalytics.getMediaReclaimStatus": {
90869
90888
  capName: "pipeline-analytics",
90870
90889
  capScope: "device",
@@ -103432,6 +103451,7 @@ object({
103432
103451
  delay: number().nonnegative().optional(),
103433
103452
  commands: record(string(), unknown())
103434
103453
  });
103454
+ entryBody({ brokerId: string() });
103435
103455
  //#endregion
103436
103456
  //#region src/pipeline-analytics/cluster-model-pin.ts
103437
103457
  /**
@@ -103728,4 +103748,4 @@ function buildClipModelRegistry(entries) {
103728
103748
  /** The built-in catalog's registry. */
103729
103749
  var BUILTIN_CLIP_MODELS = buildClipModelRegistry(CLIP_IMAGE_MODELS);
103730
103750
  //#endregion
103731
- export { MAX_TRACK_RELATIONS as $, zoneAnalyticsCapability as $i, buildViewerLink as $n, ncMediaPolicyError as $r, NcTemplatePreviewSchema as $t, DETECTION_MACRO_CLASSES as A, record as Aa, ruleKindOf as Ai, TrackPlacementSchema as An, isAlarmControllableCap as Ar, NcAlarmConfigSchema as At, EXPORT_DENSE_MAX_RANGES as B, summarizeReview as Bi, alertEpisodeId as Bn, isKnownTemplateVar as Br, NcRuleSchema as Bt, COCO_TO_MACRO as C, boolean as Ca, resolvePoolMemoryPolicy as Ci, SetTrackPurityResultSchema as Cn, ensureAlarmProfiles as Cr, NC_GROUPING_MIN_SEC as Ct, DEFAULT_DETAIL_CROP_CONVENTION as D, number as Da, ruleBelongsToAlarm as Di, TimelapseRuleInputSchema as Dn, failureContributionCapability as Dr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as Dt, CoverStateSchema as E, looseObject as Ea, ruleAutoTriggersAlarm as Ei, TRACK_RELATIONS_DEFAULT_LIMIT as En, faceGalleryCapability as Er, NC_STATE_SUMMARY_SECTION_IDS as Et, EMBEDDING_REQUIREMENTS_FAILED as F, union as Fa, startMoverUnderClearance as Fi, TrackSourceSchema as Fn, isDefaultAlarmProfileId as Fr, NcConditionDescriptorSchema as Ft, LabelAttributionSchema as G, systemEventFilterApplies as Gi, applyNonBlockingEdit as Gn, isScheduleActive as Gr, NcSnoozeInputSchema as Gt, FULL_IMAGE_BBOX as H, syncActiveAlarmProfileSettings as Hi, alertEpisodePayload as Hn, isMediaOwnerType as Hr, NcRuleUpdateInputSchema as Ht, EMBEDDING_REQUIREMENTS_UNAVAILABLE as I, unknown as Ia, storageOccupancyCapability as Ii, activateAlarmProfile as In, isDetectionMacroClass as Ir, NcConditionsSchema as It, LockStateSchema as J, templateCarriesSummary as Ji, assertTimelapseCadences as Jn, isVectorIndexDimConflict as Jr, NcStateSummarySectionIdSchema as Jt, ListTrackRelationsInputSchema as K, systemEventSummaryScheduleOf as Ki, applySecureOnArmEdit as Kn, isSystemDelivery as Kr, NcSnoozeSchema as Kt, EVENT_DENSITY_BATCH_MAX as L, DeviceType as La, subKindsOf as Li, addonWidgetsSourceCapability as Ln, isDrawableSubjectPath as Lr, NcRuleActionSchema as Lt, DeclaredDevices as M, string as Ma, secureActuationFor as Mi, TrackRelationKindSchema as Mn, isAlertEpisodeSeverity as Mr, NcAlarmSensorsInputSchema as Mt, DetectionSourceSchema as N, templateLiteral as Na, sensorRaisedOf as Ni, TrackRelationSchema as Nn, isAppLinkBase as Nr, NcAlarmSensorsSchema as Nt, DEFAULT_EVENT_COLOR as O, object as Oa, ruleDeviceCompatCapQueries as Oi, TimelapseRulePatchSchema as On, gifDeriveSpeed as Or, NC_TAXONOMY as Ot, EMBEDDING_MODEL_FAILED as P, tuple as Pa, servedTemplateVars as Pi, TrackSideSchema as Pn, isAudioClassName as Pr, NcAlarmSettingsPatchSchema as Pt, MAX_TRACK_PURITIES as Q, withSystemEventClasses as Qi, buildSubjectPath as Qn, memoizePinnedFfmpeg as Qr, NcTemplatePreviewInputSchema as Qt, EVENT_KIND_BY_CAP as R, errMsg as Ra, subjectPathSampleFromBox as Ri, alarmDeviceSecureOnArm as Rn, isEventKindLabelKey as Rr, NcRuleInputSchema as Rt, BucketAccumulator as S, array as Sa, resolveNcMediaImage as Si, SetTrackPurityInputSchema as Sn, encodeVectorBase64 as Sr, NC_GROUPING_MAX_SEC as St, ClearTrackRelationResultSchema as T, literal as Ta, rootSupplyServes as Ti, TIMELAPSE_DENSE_FLOOR_SEC as Tn, evictionPolicyOfLocation as Tr, NC_SNOOZE_MAX_MINUTES as Tt, FailureCounters as U, systemEventDeliveryProblems as Ui, applyBlockingEdit as Un, isRetiredClearKey as Ur, NcScheduleSchema as Ut, FIRST_LEVEL_MACRO_CLASSES as V, sunTimes as Vi, alertEpisodeKind as Vn, isLabelSupplyStepId as Vr, NcRuleTargetSchema as Vt, LABEL_SUPPLY_MACRO as W, systemEventFamilyProblems as Wi, applyModeDelaysEdits as Wn, isRootSuppliableStepId as Wr, NcSharedSequenceSchema as Wt, MAX_BIRTH_DECISION_RECORDS as X, vectorDimFromBase64 as Xi, audioModeOf as Xn, linkedStepOf as Xr, NcTaxonomySchema as Xt, MAX_ARCHIVED_DEBUG_NOTES as Y, templateVarsFor as Yi, audioMetricsCapability as Yn, kebabToCamel as Yr, NcSystemEventKindSchema as Yt, MAX_BIRTH_LATENCY_PROXY_MS as Z, viewerLinkBaseOf as Zi, buildEventKindDescriptor as Zn, mayWriteToLocation as Zr, NcTemplateDefaultSchema as Zt, AlarmArmModeSchema as _, nodePin as _a, resolveClipSearchMinScore as _i, SCENE_DEFAULT_QUIET_SECONDS as _n, embeddingEncoderCapability as _r, NC_CONFIRM_DEFAULT_TIMEOUT_MS as _t, CLIP_EMBEDDING_STEP_ID as a, CAP_ADVANCE_FIELDS as aa, paintHex as ai, RECORDING_EXPORT_MAX_READ_BYTES as an, consumableLowPercentOf as ar, NC_ALARM_DELAY_FIELDS as at, BaseDevice as b, ZodObject as ba, resolveModeDelays as bi, SCENE_RESET_RECAPTURES as bn, embeddingRequirementsFailedError as br, NC_DEFAULT_SNOOZE_MINUTES as bt, readClusterModelPinStrict as c, RECORD_MAX_DATA_BYTES as ca, parseProcStatus as ci, RetrainDismissedSchema as cn, createAlarmProfile as cr, NC_ALARM_SYSTEM_EVENT_KINDS as ct, APPEARANCE_BIN_COUNT as d, customAction as da, plateGalleryCapability as di, RetrainVerdictSubjectSchema as dn, derivePostTriggeredAction as dr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as dt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as ea, normalizeNcAction as ei, NcTemplateVarDescriptorSchema as en, bundledCamstack as er, MOTION_CLOSE_AFTER_MS as et, APPEARANCE_BLOCKS as f, defineAddonMigrations as fa, projectSubjectPath as fi, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as fn, deriveRecordingMode as fr, NC_CLIP_POST_ROLL_DEFAULT_SEC as ft, ActionTargetResolver as g, isDeviceScopedCap as ga, renameAlarmProfile as gi, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as gn, deviceRemovalHookCapability as gr, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX as gt, AUDIO_MACRO_LABELS as h, hydrateSchema as ha, readTimelapseGeneratedAt as hi, SCENE_DEFAULT_CHECK_INTERVAL_SEC as hn, deviceAttentionKind as hr, NC_CONDITION_CATALOG as ht, CLIP_TEXT_MODELS as i, BaseAddon as ia, occupancyScope as ii, PoolMemoryWatchdog as in, consumableFormOf as ir, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC as it, DETECTION_PIPELINE_CAP_NAME as j, strictObject as ja, sceneMonitorCapability as ji, TrackPuritySchema as jn, isAlertEpisodeOpen as jr, NcAlarmPostTriggeredActionSchema as jt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as k, partialRecord as ka, ruleGroupingApplies as ki, TimelapseRuleSchema as kn, gifFromMp4Args as kr, NC_TEMPLATE_VARS as kt, resolveClusterModelPin as l, RECORD_QUERY_MAX as la, pickFaceRescoreIntervalMinutes as li, RetrainOriginSchema as ln, deleteAlarmProfile as lr, NC_ALARM_TRIGGERED_MAX_SEC as lt, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as m, defineRecordKinds as ma, readMotionTriggeredBy as mi, SCENE_DEFAULT_ANCHOR_THRESHOLD as mn, describeSystemEventFamilyProblem as mr, NC_CLIP_RETENTION_MAX_SEC as mt, DEFAULT_CLIP_MODEL as n, evaluateSensorEdge as na, normalizeNcMediaPolicy as ni, OpsLogEntrySchema as nn, classifyRetrainReview as nr, MotionTriggeredBySchema as nt, CLUSTER_MODEL_OWNER_ADDON_ID as o, CamProfileSchema as oa, paletteResultSchema as oi, RECORDING_SOURCE_CAMSTACK_ADDON as on, coreBlockIdFromAddonId as or, NC_ALARM_DELAY_MAX_SEC as ot, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as p, defineCustomActions as pa, readDeviceStateFrom as pi, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as pn, describeSystemEventDeliveryProblem as pr, NC_CLIP_PRE_ROLL_DEFAULT_SEC as pt, ListTrackRelationsResultSchema as q, systemEventSummarySplitOf as qi, armRemovalReconcile as qn, isSystemEventSummaryRule as qr, NcSnoozeSuppressedSchema as qt, CLIP_IMAGE_MODELS as r, isSourceCap as ra, notificationRulesCapability as ri, PackageLlmVerdictSchema as rn, cloneAlarmSettings as rr, NC_ALARM_DEFAULT_PROFILE_ID as rt, FACE_EMBEDDING_STEP_ID as s, InvalidRecordError as sa, parseAlertEpisodePayload as si, RebuildObjectEmbeddingsRefusalSchema as sn, cosineSimilarity as sr, NC_ALARM_NOTIFY_FIELDS as st, BUILTIN_CLIP_MODELS as t, canonicalHash as ta, normalizeNcCapTarget as ti, OPS_LOG_DEFAULT_LIMIT as tn, calendarEventLocalSpan as tr, MediaFileKindEnum as tt, ACTION_TARGET_INVALIDATION_EVENTS as u, createEvent as ua, pipelineAnalyticsCapability as ui, RetrainStatusSchema as un, deriveDetailCropRect as ur, NC_AUDIO_CONFIRM_HITS_DEFAULT as ut, ArchivedDebugNoteSchema as v, normalizeNodeId as va, resolveDeliveryParams as vi, SCENE_DEFAULT_UNCOVERED_POLICY as vn, embeddingModelFailedError as vr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as vt, ClearTrackRelationInputSchema as w, discriminatedUnion as wa, retrainRevisionConflictMessage as wi, SetTrackRelationInputSchema as wn, eventKindLabel as wr, NC_SENSOR_TRANSITION_KINDS as wt, BirthDecisionRecordSchema as x, _enum as xa, resolveModeNotifyPolicy as xi, SceneMonitorSchema as xn, embeddingRequirementsUnavailableError as xr, NC_GROUPING_DEFAULT_SEC as xt, BIRTH_DECISION_DEFAULT_LIMIT as y, sleep as ya, resolveLocationMode as yi, SCENE_DIVERGED as yn, embeddingRefusalOf as yr, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as yt, EVENT_OWNER_TYPES as z, EventCategory as za, subjectPathSvgPoints as zi, alarmPanelCapability as zn, isEventOwnerType as zr, NcRulePatchSchema as zt };
103751
+ export { MAX_TRACK_RELATIONS as $, withSystemEventClasses as $i, buildViewerLink as $n, ncMediaPolicyError as $r, NcTemplatePreviewSchema as $t, DETECTION_MACRO_CLASSES as A, partialRecord as Aa, ruleGroupingApplies as Ai, TrackPlacementSchema as An, isAlarmControllableCap as Ar, NcAlarmConfigSchema as At, EXPORT_DENSE_MAX_RANGES as B, EventCategory as Ba, subjectPathSvgPoints as Bi, alertEpisodeId as Bn, isKnownTemplateVar as Br, NcRuleSchema as Bt, COCO_TO_MACRO as C, array as Ca, resolveNcMediaImage as Ci, SetTrackPurityResultSchema as Cn, ensureAlarmProfiles as Cr, NC_GROUPING_MIN_SEC as Ct, DEFAULT_DETAIL_CROP_CONVENTION as D, looseObject as Da, ruleAutoTriggersAlarm as Di, TimelapseRuleInputSchema as Dn, failureContributionCapability as Dr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as Dt, CoverStateSchema as E, literal as Ea, rootSupplyServes as Ei, TRACK_RELATIONS_DEFAULT_LIMIT as En, faceGalleryCapability as Er, NC_STATE_SUMMARY_SECTION_IDS as Et, EMBEDDING_REQUIREMENTS_FAILED as F, tuple as Fa, servedTemplateVars as Fi, TrackSourceSchema as Fn, isDefaultAlarmProfileId as Fr, NcConditionDescriptorSchema as Ft, LabelAttributionSchema as G, systemEventFamilyProblems as Gi, applyNonBlockingEdit as Gn, isScheduleActive as Gr, NcSnoozeInputSchema as Gt, FULL_IMAGE_BBOX as H, sunTimes as Hi, alertEpisodePayload as Hn, isMediaOwnerType as Hr, NcRuleUpdateInputSchema as Ht, EMBEDDING_REQUIREMENTS_UNAVAILABLE as I, union as Ia, startMoverUnderClearance as Ii, activateAlarmProfile as In, isDetectionMacroClass as Ir, NcConditionsSchema as It, LockStateSchema as J, systemEventSummarySplitOf as Ji, assertTimelapseCadences as Jn, isVectorIndexDimConflict as Jr, NcStateSummarySectionIdSchema as Jt, ListTrackRelationsInputSchema as K, systemEventFilterApplies as Ki, applySecureOnArmEdit as Kn, isSystemDelivery as Kr, NcSnoozeSchema as Kt, EVENT_DENSITY_BATCH_MAX as L, unknown as La, storageOccupancyCapability as Li, addonWidgetsSourceCapability as Ln, isDrawableSubjectPath as Lr, NcRuleActionSchema as Lt, DeclaredDevices as M, strictObject as Ma, sceneMonitorCapability as Mi, TrackRelationKindSchema as Mn, isAlertEpisodeSeverity as Mr, NcAlarmSensorsInputSchema as Mt, DetectionSourceSchema as N, string as Na, secureActuationFor as Ni, TrackRelationSchema as Nn, isAppLinkBase as Nr, NcAlarmSensorsSchema as Nt, DEFAULT_EVENT_COLOR as O, number as Oa, ruleBelongsToAlarm as Oi, TimelapseRulePatchSchema as On, gifDeriveSpeed as Or, NC_TAXONOMY as Ot, EMBEDDING_MODEL_FAILED as P, templateLiteral as Pa, sensorRaisedOf as Pi, TrackSideSchema as Pn, isAudioClassName as Pr, NcAlarmSettingsPatchSchema as Pt, MAX_TRACK_PURITIES as Q, viewerLinkBaseOf as Qi, buildSubjectPath as Qn, memoizePinnedFfmpeg as Qr, NcTemplatePreviewInputSchema as Qt, EVENT_KIND_BY_CAP as R, DeviceType as Ra, subKindsOf as Ri, alarmDeviceSecureOnArm as Rn, isEventKindLabelKey as Rr, NcRuleInputSchema as Rt, BucketAccumulator as S, _enum as Sa, resolveModeNotifyPolicy as Si, SetTrackPurityInputSchema as Sn, encodeVectorBase64 as Sr, NC_GROUPING_MAX_SEC as St, ClearTrackRelationResultSchema as T, discriminatedUnion as Ta, retrainRevisionConflictMessage as Ti, TIMELAPSE_DENSE_FLOOR_SEC as Tn, evictionPolicyOfLocation as Tr, NC_SNOOZE_MAX_MINUTES as Tt, FailureCounters as U, syncActiveAlarmProfileSettings as Ui, applyBlockingEdit as Un, isRetiredClearKey as Ur, NcScheduleSchema as Ut, FIRST_LEVEL_MACRO_CLASSES as V, summarizeReview as Vi, alertEpisodeKind as Vn, isLabelSupplyStepId as Vr, NcRuleTargetSchema as Vt, LABEL_SUPPLY_MACRO as W, systemEventDeliveryProblems as Wi, applyModeDelaysEdits as Wn, isRootSuppliableStepId as Wr, NcSharedSequenceSchema as Wt, MAX_BIRTH_DECISION_RECORDS as X, templateVarsFor as Xi, audioModeOf as Xn, linkedStepOf as Xr, NcTaxonomySchema as Xt, MAX_ARCHIVED_DEBUG_NOTES as Y, templateCarriesSummary as Yi, audioMetricsCapability as Yn, kebabToCamel as Yr, NcSystemEventKindSchema as Yt, MAX_BIRTH_LATENCY_PROXY_MS as Z, vectorDimFromBase64 as Zi, buildEventKindDescriptor as Zn, mayWriteToLocation as Zr, NcTemplateDefaultSchema as Zt, AlarmArmModeSchema as _, isDeviceScopedCap as _a, renameAlarmProfile as _i, SCENE_DEFAULT_QUIET_SECONDS as _n, embeddingEncoderCapability as _r, NC_CONFIRM_DEFAULT_TIMEOUT_MS as _t, CLIP_EMBEDDING_STEP_ID as a, BaseAddon as aa, paintHex as ai, RECORDING_EXPORT_MAX_READ_BYTES as an, consumableLowPercentOf as ar, NC_ALARM_DELAY_FIELDS as at, BaseDevice as b, sleep as ba, resolveLocationMode as bi, SCENE_RESET_RECAPTURES as bn, embeddingRequirementsFailedError as br, NC_DEFAULT_SNOOZE_MINUTES as bt, readClusterModelPinStrict as c, InvalidRecordError as ca, parseProcStatus as ci, RetrainDismissedSchema as cn, createAlarmProfile as cr, NC_ALARM_SYSTEM_EVENT_KINDS as ct, APPEARANCE_BIN_COUNT as d, createEvent as da, plateGalleryCapability as di, RetrainVerdictSubjectSchema as dn, derivePostTriggeredAction as dr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as dt, zoneAnalyticsCapability as ea, normalizeNcAction as ei, NcTemplateVarDescriptorSchema as en, bundledCamstack as er, MOTION_CLOSE_AFTER_MS as et, APPEARANCE_BLOCKS as f, customAction as fa, preconditionOf as fi, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as fn, deriveRecordingMode as fr, NC_CLIP_POST_ROLL_DEFAULT_SEC as ft, ActionTargetResolver as g, hydrateSchema as ga, readTimelapseGeneratedAt as gi, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as gn, deviceRemovalHookCapability as gr, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX as gt, AUDIO_MACRO_LABELS as h, defineRecordKinds as ha, readMotionTriggeredBy as hi, SCENE_DEFAULT_CHECK_INTERVAL_SEC as hn, deviceAttentionKind as hr, NC_CONDITION_CATALOG as ht, CLIP_TEXT_MODELS as i, isSourceCap as ia, occupancyScope as ii, PoolMemoryWatchdog as in, consumableFormOf as ir, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC as it, DETECTION_PIPELINE_CAP_NAME as j, record as ja, ruleKindOf as ji, TrackPuritySchema as jn, isAlertEpisodeOpen as jr, NcAlarmPostTriggeredActionSchema as jt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as k, object as ka, ruleDeviceCompatCapQueries as ki, TimelapseRuleSchema as kn, gifFromMp4Args as kr, NC_TEMPLATE_VARS as kt, resolveClusterModelPin as l, RECORD_MAX_DATA_BYTES as la, pickFaceRescoreIntervalMinutes as li, RetrainOriginSchema as ln, deleteAlarmProfile as lr, NC_ALARM_TRIGGERED_MAX_SEC as lt, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as m, defineCustomActions as ma, readDeviceStateFrom as mi, SCENE_DEFAULT_ANCHOR_THRESHOLD as mn, describeSystemEventFamilyProblem as mr, NC_CLIP_RETENTION_MAX_SEC as mt, DEFAULT_CLIP_MODEL as n, canonicalHash as na, normalizeNcMediaPolicy as ni, OpsLogEntrySchema as nn, classifyRetrainReview as nr, MotionTriggeredBySchema as nt, CLUSTER_MODEL_OWNER_ADDON_ID as o, CAP_ADVANCE_FIELDS as oa, paletteResultSchema as oi, RECORDING_SOURCE_CAMSTACK_ADDON as on, coreBlockIdFromAddonId as or, NC_ALARM_DELAY_MAX_SEC as ot, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as p, defineAddonMigrations as pa, projectSubjectPath as pi, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as pn, describeSystemEventDeliveryProblem as pr, NC_CLIP_PRE_ROLL_DEFAULT_SEC as pt, ListTrackRelationsResultSchema as q, systemEventSummaryScheduleOf as qi, armRemovalReconcile as qn, isSystemEventSummaryRule as qr, NcSnoozeSuppressedSchema as qt, CLIP_IMAGE_MODELS as r, evaluateSensorEdge as ra, notificationRulesCapability as ri, PackageLlmVerdictSchema as rn, cloneAlarmSettings as rr, NC_ALARM_DEFAULT_PROFILE_ID as rt, FACE_EMBEDDING_STEP_ID as s, CamProfileSchema as sa, parseAlertEpisodePayload as si, RebuildObjectEmbeddingsRefusalSchema as sn, cosineSimilarity as sr, NC_ALARM_NOTIFY_FIELDS as st, BUILTIN_CLIP_MODELS as t, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as ta, normalizeNcCapTarget as ti, OPS_LOG_DEFAULT_LIMIT as tn, calendarEventLocalSpan as tr, MediaFileKindEnum as tt, ACTION_TARGET_INVALIDATION_EVENTS as u, RECORD_QUERY_MAX as ua, pipelineAnalyticsCapability as ui, RetrainStatusSchema as un, deriveDetailCropRect as ur, NC_AUDIO_CONFIRM_HITS_DEFAULT as ut, ArchivedDebugNoteSchema as v, nodePin as va, resolveClipSearchMinScore as vi, SCENE_DEFAULT_UNCOVERED_POLICY as vn, embeddingModelFailedError as vr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as vt, ClearTrackRelationInputSchema as w, boolean as wa, resolvePoolMemoryPolicy as wi, SetTrackRelationInputSchema as wn, eventKindLabel as wr, NC_SENSOR_TRANSITION_KINDS as wt, BirthDecisionRecordSchema as x, ZodObject as xa, resolveModeDelays as xi, SceneMonitorSchema as xn, embeddingRequirementsUnavailableError as xr, NC_GROUPING_DEFAULT_SEC as xt, BIRTH_DECISION_DEFAULT_LIMIT as y, normalizeNodeId as ya, resolveDeliveryParams as yi, SCENE_DIVERGED as yn, embeddingRefusalOf as yr, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as yt, EVENT_OWNER_TYPES as z, errMsg as za, subjectPathSampleFromBox as zi, alarmPanelCapability as zn, isEventOwnerType as zr, NcRulePatchSchema as zt };