@camstack/system 1.2.454 → 1.2.456

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 (99) hide show
  1. package/dist/{agent-https-oXsR24R2.mjs → agent-https-fm4AR8XL.mjs} +32 -5
  2. package/dist/{agent-https-B7IjRRzT.js → agent-https-yjxdfJDA.js} +37 -4
  3. package/dist/auth/auth-audit-log.d.ts +1 -1
  4. package/dist/auth/auth-manager.d.ts +16 -1
  5. package/dist/auth/legacy-token-tables.d.ts +16 -0
  6. package/dist/auth/user-management-internal.d.ts +9 -28
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  10. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  11. package/dist/builtins/alerts/alerts.addon.js +2 -2
  12. package/dist/builtins/alerts/alerts.addon.mjs +2 -2
  13. package/dist/builtins/autotrack/index.js +1 -1
  14. package/dist/builtins/autotrack/index.mjs +1 -1
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  16. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  17. package/dist/builtins/calendars/calendars.addon.js +1 -1
  18. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  19. package/dist/builtins/camera-grid/index.js +1 -1
  20. package/dist/builtins/camera-grid/index.mjs +1 -1
  21. package/dist/builtins/composer/composer.addon.js +2 -2
  22. package/dist/builtins/composer/composer.addon.mjs +2 -2
  23. package/dist/builtins/console-logging/index.js +1 -1
  24. package/dist/builtins/console-logging/index.mjs +1 -1
  25. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  26. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  27. package/dist/builtins/device-history/device-history.addon.js +1 -1
  28. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  29. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  30. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  31. package/dist/builtins/hub-forwarder/index.js +1 -1
  32. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  33. package/dist/builtins/keychain/index.js +4 -4
  34. package/dist/builtins/keychain/index.mjs +4 -4
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  37. package/dist/builtins/local-auth/auth-schema.d.ts +4 -7
  38. package/dist/builtins/local-auth/local-auth.addon.d.ts +7 -8
  39. package/dist/builtins/local-auth/local-auth.addon.js +1094 -1327
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +1093 -1324
  41. package/dist/builtins/local-auth/preferences-record-kinds.d.ts +27 -0
  42. package/dist/builtins/local-auth/record-kinds.d.ts +4 -3
  43. package/dist/builtins/local-auth/user-preferences-store.d.ts +56 -0
  44. package/dist/builtins/local-network/local-network.addon.d.ts +8 -0
  45. package/dist/builtins/local-network/local-network.addon.js +30 -5
  46. package/dist/builtins/local-network/local-network.addon.mjs +30 -5
  47. package/dist/builtins/loki-logging/index.js +1 -1
  48. package/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  51. package/dist/builtins/platform-probe/index.js +1 -1
  52. package/dist/builtins/platform-probe/index.mjs +1 -1
  53. package/dist/builtins/record-entries/index.js +1 -1
  54. package/dist/builtins/record-entries/index.mjs +1 -1
  55. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/dist/builtins/snapshot/index.js +1 -1
  58. package/dist/builtins/snapshot/index.mjs +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  61. package/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +1 -0
  64. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +13 -0
  65. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +52 -6
  66. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +52 -6
  67. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  68. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  69. package/dist/builtins/system-config/system-config.addon.js +3 -3
  70. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  71. package/dist/builtins/winston-logging/index.js +1 -1
  72. package/dist/builtins/winston-logging/index.mjs +1 -1
  73. package/dist/{composition-sources-bt6IQDLu.mjs → composition-sources-Ds0Vr6eD.mjs} +1 -1
  74. package/dist/{composition-sources-Cukc78eu.js → composition-sources-gB4coDJR.js} +1 -1
  75. package/dist/{constants-DBGG6Zu5.js → constants-CavyKfHZ.js} +1 -1
  76. package/dist/{constants-DQcVrhVI.mjs → constants-i5oD_gLB.mjs} +1 -1
  77. package/dist/{device-ca-B3hUVfYk.js → device-ca-bpoEr0zG.js} +1 -1
  78. package/dist/{device-ca-Utfvsx5x.mjs → device-ca-qz1Pmeu1.mjs} +1 -1
  79. package/dist/{dist-7ZciHCIp.mjs → dist-BSF_C8W2.mjs} +446 -300
  80. package/dist/{dist-Bi4Ioxop.js → dist-BpqA2CT0.js} +487 -299
  81. package/dist/file-host-worker.js +1 -1
  82. package/dist/file-host-worker.mjs +1 -1
  83. package/dist/{hub-mdns-ciao-BRs3DUT-.mjs → hub-mdns-ciao-CHaGDzyz.mjs} +20 -13
  84. package/dist/{hub-mdns-ciao-2FzLWfbD.js → hub-mdns-ciao-CZlZRxxA.js} +20 -13
  85. package/dist/index.d.ts +2 -4
  86. package/dist/index.js +17 -11
  87. package/dist/index.mjs +17 -9
  88. package/dist/{phase6-declare-gate-D-2LMw9o.mjs → phase6-declare-gate-B4yfsf2n.mjs} +1 -1
  89. package/dist/{phase6-declare-gate-DwYAep7y.js → phase6-declare-gate-n-IZRklX.js} +1 -1
  90. package/dist/{restore-archive-C0ymYQk7.js → restore-archive-B4QG7XmX.js} +1 -1
  91. package/dist/{restore-archive-UVZv_hmr.mjs → restore-archive-BGUM4FKf.mjs} +1 -1
  92. package/dist/tls/cert-issue.d.ts +16 -1
  93. package/dist/tls/cert-manager.d.ts +6 -0
  94. package/dist/tls/index.d.ts +1 -1
  95. package/dist/{wal-maintenance-Df89xxrK.mjs → wal-maintenance-AerF4XE6.mjs} +0 -0
  96. package/dist/{wal-maintenance-Bo_lo3Dh.js → wal-maintenance-CNEs_I94.js} +0 -0
  97. package/package.json +1 -1
  98. package/dist/auth/admin-token-manager.d.ts +0 -51
  99. package/dist/auth/scoped-token-manager.d.ts +0 -25
@@ -745,7 +745,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
745
745
  return EventCategory;
746
746
  }({});
747
747
  //#endregion
748
- //#region ../types/dist/sleep-BxjU_fJM.mjs
748
+ //#region ../types/dist/sleep-yKL5gfrH.mjs
749
749
  /**
750
750
  * The audio chunk plane's byte format, and the ONE expansion from a coded
751
751
  * window to float samples (D455).
@@ -3257,6 +3257,12 @@ function normalizeAddonInitResult(result) {
3257
3257
  * core proxy and the kernel listener) to keep both off a kernel↔core import.
3258
3258
  */
3259
3259
  var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
3260
+ /**
3261
+ * The share-view scope kinds a share-link token can carry. The hub mints
3262
+ * and validates them (`ShareViewGrantSchema` builds its
3263
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
3264
+ */
3265
+ var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
3260
3266
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
3261
3267
  var PeerBytesTicketSchema = z.object({
3262
3268
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -10392,6 +10398,328 @@ function scopesAllowDeviceCap(scopes, access) {
10392
10398
  function scopesAllowAddon(scopes, addonId, access) {
10393
10399
  return scopes.some((s) => s.type === "addon" && s.target === addonId && s.access.includes(access));
10394
10400
  }
10401
+ /**
10402
+ * Zod schemas for persisted record types.
10403
+ *
10404
+ * These schemas serve as the single source of truth for types that are
10405
+ * stored in the settings-store backend and retrieved via tRPC. They
10406
+ * replace the manual TypeScript interfaces with schema-derived types,
10407
+ * enabling runtime validation when reading from the backend.
10408
+ *
10409
+ * Convention: each schema is named `<Type>Schema`, the inferred TS type
10410
+ * keeps the original name for backward compatibility.
10411
+ */
10412
+ /**
10413
+ * Auth model (v2 — 2026-05-12 caps-only):
10414
+ *
10415
+ * Two principals:
10416
+ * - `isAdmin: true` — full bypass. Admin scope set is ignored.
10417
+ * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
10418
+ *
10419
+ * No role enum. There used to be `viewer / agent / scoped` and earlier
10420
+ * `super_admin` — collapsed onto the single boolean because every
10421
+ * non-admin caller is governed by the same scope-check rules; the
10422
+ * distinction was only ever used to route role-specific procedures
10423
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
10424
+ * with `isAdmin: false` + an explicit scope list.
10425
+ */
10426
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
10427
+ var MethodAccessSchema = z.enum([
10428
+ "view",
10429
+ "create",
10430
+ "delete"
10431
+ ]);
10432
+ /**
10433
+ * A single scope grant. Three forms — checked in matcher with OR
10434
+ * semantics; the first match decides whether the call passes:
10435
+ *
10436
+ * - `category` — broadest. `target: 'device' | 'system'` selects every
10437
+ * cap with the matching `scope` declaration. New caps inherit grants
10438
+ * automatically — adding a device cap to the codebase makes it
10439
+ * reachable to every user with `category:device [...]` without a
10440
+ * re-grant. Use this for "family viewer" / "operator" tiers.
10441
+ *
10442
+ * - `addon` — every cap that ships inside a given addon id. Niche;
10443
+ * useful when an integration needs to interact with one specific
10444
+ * addon's surface regardless of how many caps it exports.
10445
+ *
10446
+ * - `capability` — the most precise form. Single cap name. Use for
10447
+ * integration tokens where you want to grant `addons.installPackage`
10448
+ * and nothing else.
10449
+ *
10450
+ * `access` is REQUIRED with min 1 element. `admin` bypass is the
10451
+ * "give me everything" escape; there is no wildcard scope.
10452
+ */
10453
+ var AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
10454
+ var AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
10455
+ var CapScopeSchema = z.enum(["device", "system"]);
10456
+ /**
10457
+ * DeviceSelector (scope model v3 — 2026-08-12).
10458
+ *
10459
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
10460
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
10461
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
10462
+ * AFTER the grant was minted — no re-grant, no re-login.
10463
+ *
10464
+ * - `all` — every device in the deployment. The broad viewer/operator
10465
+ * lever without a `category` grant (a `category` grant also covers device
10466
+ * caps that carry no deviceId; `all` is specifically the device set).
10467
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
10468
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
10469
+ * is NOT covered until the grant is edited.
10470
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
10471
+ * DYNAMIC. A device that changes type, or a new device of the type,
10472
+ * re-resolves on the next request.
10473
+ * - `locations` — every device whose operator-assigned `location` label is
10474
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
10475
+ * null/unset location matches NO `locations` selector.
10476
+ */
10477
+ var DeviceSelectorSchema = z.discriminatedUnion("kind", [
10478
+ z.object({ kind: z.literal("all") }),
10479
+ z.object({
10480
+ kind: z.literal("ids"),
10481
+ ids: z.array(z.number().int()).min(1)
10482
+ }),
10483
+ z.object({
10484
+ kind: z.literal("types"),
10485
+ types: z.array(z.enum(DeviceType)).min(1)
10486
+ }),
10487
+ z.object({
10488
+ kind: z.literal("locations"),
10489
+ locations: z.array(z.string().min(1)).min(1)
10490
+ })
10491
+ ]);
10492
+ var DeviceTokenScopeSchema = z.object({
10493
+ type: z.literal("device"),
10494
+ /** The device SET this grant covers — resolved against the live fleet. */
10495
+ selector: DeviceSelectorSchema,
10496
+ access: z.array(MethodAccessSchema).min(1),
10497
+ /**
10498
+ * Whether a grant on a PARENT device transparently covers its accessory
10499
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
10500
+ * Direction is parent → children ONLY.
10501
+ *
10502
+ * Absent → the matcher DERIVES it from the access flavour: `view`
10503
+ * inherits (a camera viewer sees the camera's accessories), `create` /
10504
+ * `delete` do NOT (actuating/removing a child is an explicit act the
10505
+ * operator must grant on the child, not inherit from the parent). Set it
10506
+ * explicitly to override that default per grant.
10507
+ */
10508
+ includeLinked: z.boolean().optional()
10509
+ });
10510
+ /**
10511
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
10512
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
10513
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
10514
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
10515
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
10516
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
10517
+ * migration cannot reach a JWT already in a client's hands; parse-time
10518
+ * migration covers both without a flag day. No cast — the raw object is read
10519
+ * through `Reflect.get` (its static type is `unknown`).
10520
+ */
10521
+ function migrateLegacyTokenScope(raw) {
10522
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
10523
+ if (Reflect.get(raw, "type") !== "device") return raw;
10524
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
10525
+ const targets = Reflect.get(raw, "targets");
10526
+ if (!Array.isArray(targets)) return raw;
10527
+ return {
10528
+ type: "device",
10529
+ selector: {
10530
+ kind: "ids",
10531
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
10532
+ },
10533
+ access: Reflect.get(raw, "access")
10534
+ };
10535
+ }
10536
+ var TokenScopeSchema = z.preprocess(migrateLegacyTokenScope, z.discriminatedUnion("type", [
10537
+ z.object({
10538
+ type: z.literal("category"),
10539
+ target: CapScopeSchema,
10540
+ access: z.array(MethodAccessSchema).min(1)
10541
+ }),
10542
+ z.object({
10543
+ type: z.literal("capability"),
10544
+ target: z.string(),
10545
+ access: z.array(MethodAccessSchema).min(1)
10546
+ }),
10547
+ z.object({
10548
+ type: z.literal("addon"),
10549
+ target: z.string(),
10550
+ access: z.array(MethodAccessSchema).min(1)
10551
+ }),
10552
+ DeviceTokenScopeSchema
10553
+ ]));
10554
+ var UserRecordSchema = z.object({
10555
+ id: z.string(),
10556
+ username: z.string(),
10557
+ passwordHash: z.string(),
10558
+ /**
10559
+ * Admin bypass. When true, the middleware skips the scope-access
10560
+ * check entirely. There is no other axis of privilege; the legacy
10561
+ * role enum collapsed onto this boolean in v2.
10562
+ */
10563
+ isAdmin: z.boolean().default(false),
10564
+ allowedProviders: AllowedProviderSchema,
10565
+ allowedDevices: AllowedDevicesSchema,
10566
+ /**
10567
+ * Scopes granted to this user. Admins bypass; their `scopes` is
10568
+ * ignored. Non-admins without scopes are locked out of every
10569
+ * protected call.
10570
+ */
10571
+ scopes: z.array(TokenScopeSchema).default([]),
10572
+ createdAt: z.number(),
10573
+ updatedAt: z.number()
10574
+ });
10575
+ var ApiKeyRecordSchema = z.object({
10576
+ id: z.string(),
10577
+ label: z.string(),
10578
+ isAdmin: z.boolean().default(false),
10579
+ allowedProviders: AllowedProviderSchema,
10580
+ allowedDevices: AllowedDevicesSchema,
10581
+ tokenHash: z.string(),
10582
+ tokenPrefix: z.string(),
10583
+ createdAt: z.number(),
10584
+ lastUsedAt: z.number().optional()
10585
+ });
10586
+ var ScopedTokenSchema = z.object({
10587
+ id: z.string(),
10588
+ userId: z.string(),
10589
+ name: z.string(),
10590
+ tokenHash: z.string(),
10591
+ tokenPrefix: z.string(),
10592
+ scopes: z.array(TokenScopeSchema),
10593
+ expiresAt: z.number().nullish(),
10594
+ lastUsedAt: z.number().nullish(),
10595
+ createdAt: z.number()
10596
+ });
10597
+ /** What a share-view grant lets its holder see. */
10598
+ var ShareViewGrantSchema = z.object({
10599
+ kind: z.enum(SHARE_VIEW_KINDS),
10600
+ deviceIds: z.array(z.number().int().nonnegative()).min(1).max(64),
10601
+ /** Talk-back, opt-in at mint time; absent means off. */
10602
+ talk: z.boolean().optional()
10603
+ });
10604
+ var ShareViewScopeSchema = z.object({
10605
+ type: z.literal("share-view"),
10606
+ grant: ShareViewGrantSchema
10607
+ });
10608
+ var AddonRoutesScopeSchema = z.object({
10609
+ type: z.literal("addon-routes"),
10610
+ access: z.array(MethodAccessSchema).min(1)
10611
+ });
10612
+ var PreferencesSelfScopeSchema = z.object({ type: z.literal("preferences-self") });
10613
+ var CredentialScopeSchema = z.union([
10614
+ z.literal("*"),
10615
+ ShareViewScopeSchema,
10616
+ AddonRoutesScopeSchema,
10617
+ PreferencesSelfScopeSchema,
10618
+ TokenScopeSchema
10619
+ ]);
10620
+ /**
10621
+ * The `kind` claim of a unified token. It names the TOKEN FAMILY (so every
10622
+ * older gate that classifies a hub JWT refuses it — `classifyBearerPrincipal`
10623
+ * treats any `kind` it does not know as not-a-credential), never what the
10624
+ * token may do: that is its `scopes`, and only its `scopes`.
10625
+ */
10626
+ var CREDENTIAL_TOKEN_KIND = "credential";
10627
+ /**
10628
+ * The `aud` claim every minted token is signed with (D895). The hub's raw JWT
10629
+ * verify (`AuthManager.verifyToken`, used by every surface that wants a LOGIN
10630
+ * session — the OAuth consent page, the session cookie, health, backups)
10631
+ * refuses a token carrying it, so a minted token — a share link above all —
10632
+ * can never be replayed as a person's session. Only the credential verifier's
10633
+ * own door (`verifyCredentialToken`) accepts it.
10634
+ */
10635
+ var CREDENTIAL_TOKEN_AUDIENCE = "camstack:credential";
10636
+ /** Does a verified JWT payload belong to the minted-token family? */
10637
+ function isCredentialTokenPayload(payload) {
10638
+ if (payload === null || typeof payload !== "object") return false;
10639
+ const kind = Reflect.get(payload, "kind");
10640
+ const aud = Reflect.get(payload, "aud");
10641
+ return kind === "credential" || aud === "camstack:credential" || Array.isArray(aud) && aud.includes("camstack:credential");
10642
+ }
10643
+ /**
10644
+ * The claims of a unified token (`auth.mintToken`). It carries no `exp`: its
10645
+ * row (looked up by `jti` on every verify, for revocation) holds the ONE
10646
+ * expiry, so a share link can be extended and a JWT clock can never disagree
10647
+ * with the row.
10648
+ */
10649
+ var CredentialTokenClaimsSchema = z.object({
10650
+ kind: z.literal(CREDENTIAL_TOKEN_KIND),
10651
+ sub: z.string().min(1),
10652
+ jti: z.string().min(16),
10653
+ scopes: z.array(CredentialScopeSchema).min(1)
10654
+ });
10655
+ /**
10656
+ * Per-user ACCOUNT preferences (D894): the hub-side half of the viewer's two
10657
+ * settings levels.
10658
+ *
10659
+ * - DEVICE settings never leave the phone.
10660
+ * - ACCOUNT settings live here: one row per `(user, namespace)`, private to
10661
+ * that user, synced across every device signed in as them, last write wins
10662
+ * unless the writer sends the revision it based its edit on.
10663
+ *
10664
+ * A setting lives in exactly ONE level; there are no overrides. The caller
10665
+ * never names a user: the hub stamps the principal's own id, admin included.
10666
+ *
10667
+ * The contract the client codes against is the `preferences.*` tRPC router
10668
+ * (`server/backend/src/api/core/preferences.router.ts`).
10669
+ */
10670
+ /** `viewer.app`, `viewer.cameras`, `viewer.grids` … — lowercase, dot/dash separated. */
10671
+ var PREFERENCES_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/;
10672
+ /** One row's value, measured as UTF-8 JSON. */
10673
+ var PREFERENCES_MAX_VALUE_BYTES = 256 * 1024;
10674
+ var PreferenceNamespaceSchema = z.string().regex(PREFERENCES_NAMESPACE_PATTERN);
10675
+ /** A namespace's value: a JSON object, opaque to the hub. */
10676
+ var PreferenceValueSchema = z.record(z.string(), z.unknown());
10677
+ var PreferenceDeviceIdSchema = z.string().min(1).max(64);
10678
+ /** A stored row, as the owner reads it. */
10679
+ var PreferenceRowSchema = z.object({
10680
+ namespace: PreferenceNamespaceSchema,
10681
+ value: PreferenceValueSchema,
10682
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
10683
+ revision: z.number().int().positive(),
10684
+ updatedAt: z.number().int(),
10685
+ /** The client id the last writer sent; `null` when it sent none. */
10686
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
10687
+ });
10688
+ z.object({
10689
+ /** Absent: every namespace the caller holds. */
10690
+ namespaces: z.array(PreferenceNamespaceSchema).max(32).optional() });
10691
+ z.object({ rows: z.array(PreferenceRowSchema) });
10692
+ z.object({
10693
+ namespace: PreferenceNamespaceSchema,
10694
+ value: PreferenceValueSchema,
10695
+ /**
10696
+ * The revision the edit was based on. Absent: last write wins. `0`: the
10697
+ * namespace must not exist yet. Any other value that is not the current
10698
+ * revision answers `conflict` and writes nothing.
10699
+ */
10700
+ baseRevision: z.number().int().nonnegative().optional(),
10701
+ deviceId: PreferenceDeviceIdSchema.optional()
10702
+ });
10703
+ z.discriminatedUnion("status", [z.object({
10704
+ status: z.literal("saved"),
10705
+ row: PreferenceRowSchema
10706
+ }), z.object({
10707
+ status: z.literal("conflict"),
10708
+ current: PreferenceRowSchema.nullable()
10709
+ })]);
10710
+ z.object({ namespace: PreferenceNamespaceSchema });
10711
+ z.object({
10712
+ /** `false` when the namespace did not exist. */
10713
+ deleted: z.boolean() });
10714
+ z.object({
10715
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
10716
+ revisionByNamespace: z.record(PreferenceNamespaceSchema, z.number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
10717
+ z.object({
10718
+ /** Every row whose revision differs from the client's, and every row it did not list. */
10719
+ rows: z.array(PreferenceRowSchema),
10720
+ /** Namespaces the client listed that no longer exist. */
10721
+ deleted: z.array(PreferenceNamespaceSchema)
10722
+ });
10395
10723
  z.enum(["new-session", "step-up"]);
10396
10724
  /** The languages the hub's app landing pages are written in (D858). */
10397
10725
  var AppPageLangSchema = z.enum(["en", "it"]);
@@ -41988,38 +42316,37 @@ var llmRuntimeCapability = {
41988
42316
  })
41989
42317
  }
41990
42318
  };
42319
+ var LlmProfileKindSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
42320
+ /** What a model (or, by default, every model of a kind) can do. */
42321
+ var LlmModelFeaturesSchema = z.object({
42322
+ vision: z.boolean(),
42323
+ tools: z.boolean(),
42324
+ streaming: z.boolean()
42325
+ });
42326
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
42327
+ var LlmModelInfoSchema = z.object({
42328
+ id: z.string(),
42329
+ label: z.string().optional(),
42330
+ contextLength: z.number().int().positive().optional(),
42331
+ features: LlmModelFeaturesSchema.partial().optional()
42332
+ });
41991
42333
  /**
41992
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
41993
- * methods concat-fan across providers; single-row methods route to ONE
41994
- * provider by the `addonId` in the call input (the notification-output
41995
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
41996
- * (hub-placed); the cap stays open for future providers.
41997
- *
41998
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
41999
- * `apiKey` is a password field — providers REDACT it on read and merge on
42000
- * write; a stored key NEVER round-trips to a client.
42001
- */
42002
- var LlmProfileKindSchema = z.enum([
42003
- "openai-compatible",
42004
- "openai",
42005
- "anthropic",
42006
- "google",
42007
- "managed-local",
42008
- "apple-foundation"
42009
- ]);
42334
+ * The provider-specific part of a profile, validated by the provider that owns
42335
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
42336
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
42337
+ * keychain, never in the row, and reads back as the redaction marker.
42338
+ */
42339
+ var LlmProviderConfigSchema = z.record(z.string(), z.unknown());
42010
42340
  var LlmProfileSchema = z.object({
42011
42341
  id: z.string(),
42012
42342
  name: z.string(),
42343
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
42013
42344
  kind: LlmProfileKindSchema,
42014
42345
  /** Stamped by the provider — keeps the fanned catalog routable. */
42015
42346
  addonId: z.string(),
42016
42347
  enabled: z.boolean(),
42017
42348
  /** Vendor model id, or the managed runtime's loaded model. */
42018
42349
  model: z.string(),
42019
- /** Required for openai-compatible; override for cloud kinds. */
42020
- baseUrl: z.string().optional(),
42021
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
42022
- apiKey: z.string().optional(),
42023
42350
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
42024
42351
  * degraded to text — that shipped once and produced a confident answer to a
42025
42352
  * question about a picture nobody sent. */
@@ -42027,15 +42354,11 @@ var LlmProfileSchema = z.object({
42027
42354
  temperature: z.number().min(0).max(2).optional(),
42028
42355
  /** Nucleus sampling. Every wire we speak has it. */
42029
42356
  topP: z.number().min(0).max(1).optional(),
42030
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
42031
- * wire does, and the client drops it there (measured: the request body gets
42032
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
42033
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
42357
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
42358
+ * field in its editor only when its descriptor lists it in `profileFields`. */
42034
42359
  topK: z.number().int().positive().optional(),
42035
42360
  maxTokens: z.number().int().positive().optional(),
42036
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
42037
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
42038
- * the model with, so it is the one field that changes a PROCESS. */
42361
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
42039
42362
  contextLength: z.number().int().positive().optional(),
42040
42363
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
42041
42364
  * two system prompts fighting is worse than either alone). */
@@ -42061,16 +42384,37 @@ var LlmProfileSchema = z.object({
42061
42384
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
42062
42385
  * `true` here buys the wiring, not behaviour, until tools are registered. */
42063
42386
  toolsEnabled: z.boolean().default(false),
42064
- extraHeaders: z.record(z.string(), z.string()).optional(),
42065
- /** kind === 'managed-local' only (spec §4). */
42066
- runtime: ManagedRuntimeConfigSchema.optional(),
42067
- /**
42068
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
42069
- * to configure (no key, no URL, no download; `model` is `apple-system`).
42070
- * `supportsVision` on such a row is stamped by the provider from the node's
42071
- * reported `imageInput`, never taken from the operator (D62).
42072
- */
42073
- appleFoundation: z.object({ nodeId: z.string() }).optional()
42387
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
42388
+ providerConfig: LlmProviderConfigSchema.default({})
42389
+ });
42390
+ /**
42391
+ * The common profile fields a kind's editor offers. The editor owns how each
42392
+ * one is drawn; the provider says which of them mean something on its wire.
42393
+ */
42394
+ var LlmProfileFieldSchema = z.enum([
42395
+ "temperature",
42396
+ "topP",
42397
+ "topK",
42398
+ "maxTokens",
42399
+ "contextLength",
42400
+ "systemPrompt",
42401
+ "timeoutMs",
42402
+ "connectTimeoutMs",
42403
+ "firstTokenTimeoutMs",
42404
+ "idleTimeoutMs",
42405
+ "retry",
42406
+ "toolsEnabled"
42407
+ ]);
42408
+ /**
42409
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
42410
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
42411
+ * picker: that widget owns the model choice.
42412
+ */
42413
+ var LlmProviderWidgetSchema = z.object({
42414
+ id: z.string(),
42415
+ placement: z.enum(["connection", "model"]),
42416
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
42417
+ requires: z.array(z.string()).optional()
42074
42418
  });
42075
42419
  /** ConfigUISchema tree passed through untyped on the wire (the
42076
42420
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -42079,11 +42423,56 @@ var ConfigSchemaPassthrough$3 = z.unknown();
42079
42423
  var LlmProfileKindDescriptorSchema = z.object({
42080
42424
  kind: LlmProfileKindSchema,
42081
42425
  label: z.string(),
42426
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
42082
42427
  icon: z.string(),
42083
42428
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
42084
42429
  addonId: z.string(),
42085
- configSchema: ConfigSchemaPassthrough$3
42430
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
42431
+ connectionSchema: ConfigSchemaPassthrough$3,
42432
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
42433
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
42434
+ /** The kind's defaults; a model from `listModels` may override any of them. */
42435
+ features: LlmModelFeaturesSchema,
42436
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
42437
+ visionEditable: z.boolean(),
42438
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
42439
+ modelCatalog: z.enum([
42440
+ "fetch",
42441
+ "static",
42442
+ "none"
42443
+ ]),
42444
+ staticModels: z.array(LlmModelInfoSchema).optional(),
42445
+ /** The common fields that mean something on this kind's wire. */
42446
+ profileFields: z.array(LlmProfileFieldSchema),
42447
+ providerWidgets: z.array(LlmProviderWidgetSchema).optional()
42448
+ });
42449
+ /**
42450
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
42451
+ * (the editor's form); with `profileId` too, a secret the draft leaves
42452
+ * untouched (absent or the redaction marker) is resolved server-side from the
42453
+ * stored profile — the browser never receives it.
42454
+ */
42455
+ var LlmListModelsInputSchema = z.object({
42456
+ addonId: z.string(),
42457
+ kind: LlmProfileKindSchema,
42458
+ profileId: z.string().optional(),
42459
+ connection: LlmProviderConfigSchema.optional()
42086
42460
  });
42461
+ var LlmListModelsErrorCodeSchema = z.enum([
42462
+ "auth",
42463
+ "network",
42464
+ "unsupported",
42465
+ "invalid"
42466
+ ]);
42467
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
42468
+ var LlmListModelsResultSchema = z.discriminatedUnion("ok", [z.object({
42469
+ ok: z.literal(true),
42470
+ models: z.array(LlmModelInfoSchema)
42471
+ }), z.object({
42472
+ ok: z.literal(false),
42473
+ code: LlmListModelsErrorCodeSchema,
42474
+ message: z.string()
42475
+ })]);
42087
42476
  var LlmDefaultSelectorSchema = z.union([z.object({ consumer: z.string() }), z.object({ purpose: z.enum(["text", "vision"]) })]);
42088
42477
  var LlmDefaultSchema = z.object({
42089
42478
  selector: LlmDefaultSelectorSchema,
@@ -42214,8 +42603,17 @@ var llmCapability = {
42214
42603
  auth: "admin",
42215
42604
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
42216
42605
  }),
42217
- /** Live vendor enumeration (GET /models etc.). */
42218
- listModels: method(ProfileRefInputSchema, z.array(z.string())),
42606
+ /**
42607
+ * The models a kind offers, for a SAVED profile or an unsaved draft
42608
+ * (`connection`). A mutation, not a query: a draft may carry a key, and a
42609
+ * query's input travels in the URL. Admin: it dials whatever endpoint the
42610
+ * draft names and may resolve a stored key to do it. The answer never
42611
+ * carries a secret — failures are a typed result, never a throw.
42612
+ */
42613
+ listModels: method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
42614
+ kind: "mutation",
42615
+ auth: "admin"
42616
+ }),
42219
42617
  getDefaults: method(z.object({}), z.array(LlmDefaultSchema)),
42220
42618
  setDefault: method(z.object({
42221
42619
  selector: LlmDefaultSelectorSchema,
@@ -46812,202 +47210,6 @@ var notificationRulesCapability = {
46812
47210
  }
46813
47211
  };
46814
47212
  /**
46815
- * Zod schemas for persisted record types.
46816
- *
46817
- * These schemas serve as the single source of truth for types that are
46818
- * stored in the settings-store backend and retrieved via tRPC. They
46819
- * replace the manual TypeScript interfaces with schema-derived types,
46820
- * enabling runtime validation when reading from the backend.
46821
- *
46822
- * Convention: each schema is named `<Type>Schema`, the inferred TS type
46823
- * keeps the original name for backward compatibility.
46824
- */
46825
- /**
46826
- * Auth model (v2 — 2026-05-12 caps-only):
46827
- *
46828
- * Two principals:
46829
- * - `isAdmin: true` — full bypass. Admin scope set is ignored.
46830
- * - `isAdmin: false` — every call gated by `scopes` (see TokenScope).
46831
- *
46832
- * No role enum. There used to be `viewer / agent / scoped` and earlier
46833
- * `super_admin` — collapsed onto the single boolean because every
46834
- * non-admin caller is governed by the same scope-check rules; the
46835
- * distinction was only ever used to route role-specific procedures
46836
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
46837
- * with `isAdmin: false` + an explicit scope list.
46838
- */
46839
- /** Per-method access flavour. Materialised on every cap method via codegen. */
46840
- var MethodAccessSchema = z.enum([
46841
- "view",
46842
- "create",
46843
- "delete"
46844
- ]);
46845
- /**
46846
- * A single scope grant. Three forms — checked in matcher with OR
46847
- * semantics; the first match decides whether the call passes:
46848
- *
46849
- * - `category` — broadest. `target: 'device' | 'system'` selects every
46850
- * cap with the matching `scope` declaration. New caps inherit grants
46851
- * automatically — adding a device cap to the codebase makes it
46852
- * reachable to every user with `category:device [...]` without a
46853
- * re-grant. Use this for "family viewer" / "operator" tiers.
46854
- *
46855
- * - `addon` — every cap that ships inside a given addon id. Niche;
46856
- * useful when an integration needs to interact with one specific
46857
- * addon's surface regardless of how many caps it exports.
46858
- *
46859
- * - `capability` — the most precise form. Single cap name. Use for
46860
- * integration tokens where you want to grant `addons.installPackage`
46861
- * and nothing else.
46862
- *
46863
- * `access` is REQUIRED with min 1 element. `admin` bypass is the
46864
- * "give me everything" escape; there is no wildcard scope.
46865
- */
46866
- var AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
46867
- var AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
46868
- var CapScopeSchema = z.enum(["device", "system"]);
46869
- /**
46870
- * DeviceSelector (scope model v3 — 2026-08-12).
46871
- *
46872
- * A `device` grant no longer carries a frozen list of deviceIds. It carries
46873
- * a SELECTOR the matcher resolves against the live fleet, so the grant can be
46874
- * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
46875
- * AFTER the grant was minted — no re-grant, no re-login.
46876
- *
46877
- * - `all` — every device in the deployment. The broad viewer/operator
46878
- * lever without a `category` grant (a `category` grant also covers device
46879
- * caps that carry no deviceId; `all` is specifically the device set).
46880
- * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
46881
- * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
46882
- * is NOT covered until the grant is edited.
46883
- * - `types` — every device of a `DeviceType` (e.g. every `camera`).
46884
- * DYNAMIC. A device that changes type, or a new device of the type,
46885
- * re-resolves on the next request.
46886
- * - `locations` — every device whose operator-assigned `location` label is
46887
- * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
46888
- * null/unset location matches NO `locations` selector.
46889
- */
46890
- var DeviceSelectorSchema = z.discriminatedUnion("kind", [
46891
- z.object({ kind: z.literal("all") }),
46892
- z.object({
46893
- kind: z.literal("ids"),
46894
- ids: z.array(z.number().int()).min(1)
46895
- }),
46896
- z.object({
46897
- kind: z.literal("types"),
46898
- types: z.array(z.enum(DeviceType)).min(1)
46899
- }),
46900
- z.object({
46901
- kind: z.literal("locations"),
46902
- locations: z.array(z.string().min(1)).min(1)
46903
- })
46904
- ]);
46905
- var DeviceTokenScopeSchema = z.object({
46906
- type: z.literal("device"),
46907
- /** The device SET this grant covers — resolved against the live fleet. */
46908
- selector: DeviceSelectorSchema,
46909
- access: z.array(MethodAccessSchema).min(1),
46910
- /**
46911
- * Whether a grant on a PARENT device transparently covers its accessory
46912
- * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
46913
- * Direction is parent → children ONLY.
46914
- *
46915
- * Absent → the matcher DERIVES it from the access flavour: `view`
46916
- * inherits (a camera viewer sees the camera's accessories), `create` /
46917
- * `delete` do NOT (actuating/removing a child is an explicit act the
46918
- * operator must grant on the child, not inherit from the parent). Set it
46919
- * explicitly to override that default per grant.
46920
- */
46921
- includeLinked: z.boolean().optional()
46922
- });
46923
- /**
46924
- * v2 → v3 lazy migration. A pre-v3 `device` grant carried
46925
- * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
46926
- * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
46927
- * EVERY parse path — stored records AND the JWT-carried scope arrays
46928
- * normalised at the request boundary ({@link normalizeTokenScopes} in
46929
- * `device-selector.ts`). Chosen over a one-time DB migration because a
46930
- * migration cannot reach a JWT already in a client's hands; parse-time
46931
- * migration covers both without a flag day. No cast — the raw object is read
46932
- * through `Reflect.get` (its static type is `unknown`).
46933
- */
46934
- function migrateLegacyTokenScope(raw) {
46935
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
46936
- if (Reflect.get(raw, "type") !== "device") return raw;
46937
- if (Reflect.get(raw, "selector") !== void 0) return raw;
46938
- const targets = Reflect.get(raw, "targets");
46939
- if (!Array.isArray(targets)) return raw;
46940
- return {
46941
- type: "device",
46942
- selector: {
46943
- kind: "ids",
46944
- ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
46945
- },
46946
- access: Reflect.get(raw, "access")
46947
- };
46948
- }
46949
- var TokenScopeSchema = z.preprocess(migrateLegacyTokenScope, z.discriminatedUnion("type", [
46950
- z.object({
46951
- type: z.literal("category"),
46952
- target: CapScopeSchema,
46953
- access: z.array(MethodAccessSchema).min(1)
46954
- }),
46955
- z.object({
46956
- type: z.literal("capability"),
46957
- target: z.string(),
46958
- access: z.array(MethodAccessSchema).min(1)
46959
- }),
46960
- z.object({
46961
- type: z.literal("addon"),
46962
- target: z.string(),
46963
- access: z.array(MethodAccessSchema).min(1)
46964
- }),
46965
- DeviceTokenScopeSchema
46966
- ]));
46967
- var UserRecordSchema = z.object({
46968
- id: z.string(),
46969
- username: z.string(),
46970
- passwordHash: z.string(),
46971
- /**
46972
- * Admin bypass. When true, the middleware skips the scope-access
46973
- * check entirely. There is no other axis of privilege; the legacy
46974
- * role enum collapsed onto this boolean in v2.
46975
- */
46976
- isAdmin: z.boolean().default(false),
46977
- allowedProviders: AllowedProviderSchema,
46978
- allowedDevices: AllowedDevicesSchema,
46979
- /**
46980
- * Scopes granted to this user. Admins bypass; their `scopes` is
46981
- * ignored. Non-admins without scopes are locked out of every
46982
- * protected call.
46983
- */
46984
- scopes: z.array(TokenScopeSchema).default([]),
46985
- createdAt: z.number(),
46986
- updatedAt: z.number()
46987
- });
46988
- var ApiKeyRecordSchema = z.object({
46989
- id: z.string(),
46990
- label: z.string(),
46991
- isAdmin: z.boolean().default(false),
46992
- allowedProviders: AllowedProviderSchema,
46993
- allowedDevices: AllowedDevicesSchema,
46994
- tokenHash: z.string(),
46995
- tokenPrefix: z.string(),
46996
- createdAt: z.number(),
46997
- lastUsedAt: z.number().optional()
46998
- });
46999
- var ScopedTokenSchema = z.object({
47000
- id: z.string(),
47001
- userId: z.string(),
47002
- name: z.string(),
47003
- tokenHash: z.string(),
47004
- tokenPrefix: z.string(),
47005
- scopes: z.array(TokenScopeSchema),
47006
- expiresAt: z.number().nullish(),
47007
- lastUsedAt: z.number().nullish(),
47008
- createdAt: z.number()
47009
- });
47010
- /**
47011
47213
  * `oauth-integration` — a collection cap by which an addon declares
47012
47214
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
47013
47215
  * Each provider returns a static descriptor; the core enumerates them
@@ -71304,26 +71506,6 @@ var ApiKeySummarySchema = z.object({
71304
71506
  createdAt: z.number(),
71305
71507
  lastUsedAt: z.number().optional()
71306
71508
  });
71307
- var ScopedTokenSummarySchema = z.object({
71308
- id: z.string(),
71309
- userId: z.string(),
71310
- name: z.string(),
71311
- tokenPrefix: z.string(),
71312
- scopes: z.array(TokenScopeSchema),
71313
- expiresAt: z.number().nullish(),
71314
- lastUsedAt: z.number().nullish(),
71315
- createdAt: z.number()
71316
- });
71317
- var CreateScopedTokenInputSchema = z.object({
71318
- userId: z.string(),
71319
- name: z.string(),
71320
- scopes: z.array(TokenScopeSchema),
71321
- expiresAt: z.number().optional()
71322
- });
71323
- var CreateScopedTokenResultSchema = z.object({
71324
- token: z.string(),
71325
- record: ScopedTokenSummarySchema
71326
- });
71327
71509
  var OauthSessionSummarySchema = z.object({
71328
71510
  id: z.string(),
71329
71511
  userId: z.string(),
@@ -71345,11 +71527,11 @@ var TotpStatusSchema = z.object({
71345
71527
  confirmedAt: z.number().nullable()
71346
71528
  });
71347
71529
  /**
71348
- * user-management — singleton capability for user accounts, API keys,
71349
- * and scoped tokens.
71530
+ * user-management — singleton capability for user accounts and the
71531
+ * legacy API-key rows.
71350
71532
  *
71351
71533
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
71352
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
71534
+ * — the subset check on `setUserScopes` is moot
71353
71535
  * because non-admins never reach these. If/when we open non-admin
71354
71536
  * delegation, structural caller-scope subset check goes inside the
71355
71537
  * provider.
@@ -71420,18 +71602,6 @@ var userManagementCapability = {
71420
71602
  auth: "admin",
71421
71603
  access: "delete"
71422
71604
  }),
71423
- createScopedToken: method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
71424
- kind: "mutation",
71425
- auth: "admin",
71426
- access: "create"
71427
- }),
71428
- revokeScopedToken: method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), {
71429
- kind: "mutation",
71430
- auth: "admin",
71431
- access: "delete"
71432
- }),
71433
- validateScopedToken: method(z.object({ token: z.string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }),
71434
- listScopedTokens: method(z.object({ userId: z.string() }), z.array(ScopedTokenSummarySchema), { auth: "admin" }),
71435
71605
  setupTotp: method(z.object({ userId: z.string() }), TotpSetupResultSchema, {
71436
71606
  kind: "mutation",
71437
71607
  auth: "admin",
@@ -77920,7 +78090,7 @@ var METHOD_ACCESS_MAP = Object.freeze({
77920
78090
  capName: "llm",
77921
78091
  capScope: "system",
77922
78092
  addonId: null,
77923
- access: "view"
78093
+ access: "create"
77924
78094
  },
77925
78095
  "llm.listNodeModels": {
77926
78096
  capName: "llm",
@@ -82584,12 +82754,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82584
82754
  addonId: null,
82585
82755
  access: "create"
82586
82756
  },
82587
- "userManagement.createScopedToken": {
82588
- capName: "user-management",
82589
- capScope: "system",
82590
- addonId: null,
82591
- access: "create"
82592
- },
82593
82757
  "userManagement.createUser": {
82594
82758
  capName: "user-management",
82595
82759
  capScope: "system",
@@ -82638,12 +82802,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82638
82802
  addonId: null,
82639
82803
  access: "view"
82640
82804
  },
82641
- "userManagement.listScopedTokens": {
82642
- capName: "user-management",
82643
- capScope: "system",
82644
- addonId: null,
82645
- access: "view"
82646
- },
82647
82805
  "userManagement.listUsers": {
82648
82806
  capName: "user-management",
82649
82807
  capScope: "system",
@@ -82698,12 +82856,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82698
82856
  addonId: null,
82699
82857
  access: "delete"
82700
82858
  },
82701
- "userManagement.revokeScopedToken": {
82702
- capName: "user-management",
82703
- capScope: "system",
82704
- addonId: null,
82705
- access: "delete"
82706
- },
82707
82859
  "userManagement.setupTotp": {
82708
82860
  capName: "user-management",
82709
82861
  capScope: "system",
@@ -82734,12 +82886,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
82734
82886
  addonId: null,
82735
82887
  access: "view"
82736
82888
  },
82737
- "userManagement.validateScopedToken": {
82738
- capName: "user-management",
82739
- capScope: "system",
82740
- addonId: null,
82741
- access: "view"
82742
- },
82743
82889
  "userManagement.verifyTotp": {
82744
82890
  capName: "user-management",
82745
82891
  capScope: "system",
@@ -88324,4 +88470,4 @@ function armRemovalReconcile(opts) {
88324
88470
  return () => clearInterval(timer);
88325
88471
  }
88326
88472
  //#endregion
88327
- export { STORAGE_ADMIN_SCOPED_BASES as $, normalizeSecretOwner as $i, resolveBucketMs as $n, FilterRequiredError as $r, enumerateItemArrayFields as $t, DataStoreDatabaseSchema as A, collectSecretMarkerRefs as Ai, logLevelAtMost as An, COMPOSER_ADDON_ID as Ar, compositionFieldKey as At, KEYCHAIN_RESET_TRIGGER_ACTOR as B, formatSecretScope as Bi, objectInputDeclaresAddonId as Bn, disarmRoseMemory as Br, declarationOwnerNodeId as Bt, DAY_NAMES as C, asJsonObject as Ci, keychainCapability as Cn, userManagementCapability as Cr, buildDeviceSignatureMessage as Ct, DEVICE_SAN_CREDENTIAL_PREFIX as D, buildSecretRef as Di, localNetworkCapability as Dn, vectorIndexDimConflictError as Dr, canonicalIconKey as Dt, DEVICE_NONCE_TTL_MS as E, assertValidDeclaration as Ei, lifecycleJobSchema as En, vectorDimFromBase64 as Er, cameraGridLayoutCapability as Et, FieldClaimModeSchema as F, defineCustomActions as Fi, metricsProviderCapability as Fn, compositionFeatureEnabled as Fr, coreBlockSourceKind as Ft, METHOD_ACCESS_MAP as G, isSecretClear as Gi, platformProbeCapability as Gn, errMsg as Gr, deviceCredentialsCapability as Gt, KeychainResetRecordSchema as H, isDeviceConfigCap as Hi, parseStreamParamsFormPatch as Hn, DeviceFeature as Hr, defineExtensionSlotProvider as Ht, FieldClaimSchema as I, defineRecordKinds as Ii, modeMayWrite as In, compositionItemFieldPath as Ir, coreBlocksCapability as It, NetworkTunnelStartedDataSchema as J, isSecretRefOwnedBy as Ji, recordEntriesCapability as Jn, CALLER_STAMPED_CAPABILITIES as Jr, deviceManagerCapability as Jt, MINUTES_PER_DAY as K, isSecretMarker as Ki, procedureAuthKey as Kn, BaseAddon as Kr, deviceExtensionCapability as Kt, HISTORY_CATALOG as L, emitDownForOwnedCaps as Li, motionCapability as Ln, compositionSliceKey as Lr, createDeviceExtensionProvider as Lt, DeviceStatusSchema as M, createEvent as Mi, mayReadLocation as Mn, cloneStatefulExpressionMemory as Mr, coreBlockAddonId as Mt, DeviceTombstoneSchema as N, customAction as Ni, mayWriteToLocation as Nn, composedDeviceRef as Nr, coreBlockComposition as Nt, DEVICE_SAN_USER_PREFIX as O, collectSecretConfigKeys as Oi, locationIconKey as On, vectorStoreCapability as Or, checkRoleAddress as Ot, FIRST_LEVEL_MACRO_CLASSES as P, declarationsOf as Pi, memoizePinnedFfmpeg as Pn, composedDeviceStableId as Pr, coreBlockIdFromAddonId as Pt, STORAGE_ADMIN_MOVED_COLLECTIONS as Q, normalizeNodeId as Qi, resolveAppConnections as Qn, DeclarationRefusedError as Qr, enumerateInferenceDevices as Qt, HUB_MDNS_SERVICE_TYPE as R, emitReadiness as Ri, normalizeCoreBlockWrite as Rn, compositionSourceKey as Rr, dataStoreProviderCapability as Rt, DATA_STORE_DATABASES as S, WELL_KNOWN_TAB_MAP as Si, keychainAdminCapability as Sn, supportedRuntimes as Sr, buildDeviceEnrollmentLink as St, DEVICE_ENROLLMENT_TTL_MS as T, asString$1 as Ti, legacyModeOf as Tn, validateCustomAddress as Tr, calendarsCapability as Tt, LOG_LEVEL_RANK as U, isEvent as Ui, pickAppLinkHub as Un, DeviceRole as Ur, deriveBatteryPresence as Ut, KeychainAuditEntrySchema as V, hydrateSchema as Vi, objectInputDeclaresRequiredDeviceId as Vn, toExpressionValue as Vr, decodeVectorBase64 as Vt, LegacyStorageLocationDefaultSchema as W, isKeychainStoredField as Wi, planComposition as Wn, DeviceType as Wr, describeComposableCaps as Wt, RecordingStatusSchema as X, mapSecretLeaves as Xi, reducePoints as Xn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Xr, deviceStateCapability as Xt, RECORDING_SOURCE_CAMSTACK_ADDON as Y, makeSecretMarker as Yi, recordsCapability as Yn, DATAPLANE_SECRET_HEADER as Yr, deviceRemovalHookCapability as Yt, STORAGE_ACCESS_FALLBACK as Z, nodePin as Zi, replacedFieldKeys as Zn, DEVICE_STATUS_METHOD as Zr, deviceStatusCapability as Zt, CatalogFileSchema as _, withoutCallerStamp as _a, RecordUniqueViolationError as _i, isDefaultAppConnectionEndpoint as _n, storageMigrationCapability as _r, authProviderCapability as _t, ApiKeyRecordSchema as a, readinessKey as aa, RECORD_BATCH_MAX as ai, extractNestedAddonId as an, resolveNotificationTapAddress as ar, StorageLocationModeSchema as at, DATABASE_SNAPSHOT_SUFFIX as b, UnindexedFilterError as bi, isVoidInput as bn, streamCatalogCapability as br, batteryCapability as bt, CAMERA_SWITCH_ORDER as c, resolveSecretMarkers as ca, RECORD_SWEEP_INTERVAL_MS as ci, formatDeviceRevoker as cn, scopesAllowDeviceCap as cr, TokenScopeSchema as ct, CATALOG_LANGS as d, secretTreeFromSchema as da, RUNTIME_DEFAULTS as di, interpolate as dn, shortHostname as dr, addonSettingsCapability as dt, parseJsonObject as ea, ForeignSecretMarkerError as ei, enumerateSchemaFields as en, resolveCoreBlockEntry as er, STREAM_PROFILE_META as et, COMPOSED_ITEM_FIXED_FIELDS as f, sleep as fa, ReadinessRegistry as fi, isAlertEpisodeOpen as fn, siteZoneKey as fr, addonWidgetsCapability as ft, CalendarPreferencesSchema as g, userError as ga, RecordTooLargeError as gi, isCollectionArrayMethod as gn, storageCapability as gr, armRemovalReconcile as gt, CORE_BLOCK_ADDON_PREFIX as h, transformSecretWrite as ha, RecordNotFoundError as hi, isArrayOutputSchema as hn, storageAdminCapability as hr, alertsCapability as ht, AlertSchema as i, parseSettingsBrokersAdoptsFrom as ia, PlaintextSecretError as ii, expressionContainsBuiltinCall as in, resolveMethodAuth as ir, StorageCleanupJobSchema as it, DeclaredDevices as j, collectZodSecretPaths as ji, looseSchema as jn, buildFfmpegArgs as jr, compositionSourceRefs as jt, DEVICE_TOMBSTONE_RETENTION_MS as k, collectSecretLeaves as ki, logDestinationCapability as kn, withLocationMode as kr, composerCapability as kt, CAMSTACK_APP_LINK_ORIGIN as l, scopeKey as la, REDACTED_SECRET as li, formatMinutes as ln, scoreRuntimes as lr, UserRecordSchema as lt, CORE_BLOCKS_ADDON_ID as m, toSecretFieldView as ma, RecordKindDeclarationSchema as mi, isAppLinkBase as mn, splitTranslationRef as mr, alertEpisodePayload as mt, AGENT_MDNS_TXT_KEYS as n, parseSecretRef as na, InvalidRecordError as ni, evictionPolicyOfLocation as nn, resolveHubAddressRoles as nr, ServerNameSchema as nt, BaseDevice as o, recordSecretRef as oa, RECORD_BATCH_MAX_BYTES as oi, filesystemBrowseCapability as on, runtimeStatePolicyFor as or, StorageLocationTypeSchema as ot, COMPOSER_RUNNER_ID as p, toNodeId as pa, ReadinessTimeoutError as pi, isAlertEpisodeSeverity as pn, snapshotCapability as pr, alertEpisodeId as pt, MOTION_CLOSE_AFTER_MS as q, isSecretMarkerLike as qi, ptzAutotrackCapability as qn, BatchTooLargeError as qr, deviceHistoryCapability as qt, ALL_CAPABILITY_DEFINITIONS as r, parseSettingsArrayAdoptsFrom as ra, NoCallerError as ri, expandContainer as rn, resolveLocationMode as rr, SsoBridgeClaimsSchema as rt, BatteryStatusSchema as s, resolveCapMount as sa, RECORD_DELETE_BATCH as si, foldSnapshotByFunction as sn, scopesAllowAddon as sr, StorageMigrationJobSchema as st, AGENT_MDNS_SERVICE_TYPE as t, parseJsonUnknown as ta, HISTORY_DEFAULT_MIN_INTERVAL_MS as ti, evaluateCompositionField as tn, resolveCoreBlockFiles as tr, ScopedTokenSchema as tt, CAP_NAMES_WITH_STATUS as u, secretTreeFromPaths as ua, REMOVE_LEAF as ui, gbToBytes as un, settingsStoreCapability as ur, addonPagesCapability as ut, CoreBlockSchema as v, EventCategory as va, RevConflictError as vi, isLocationEnabled as vn, storageOccupancyCapability as vr, backupCapability as vt, DERIVED_CAMERA_SILENCED_CAP_NAMES as w, asNumber as wi, legacyAutoLinkIds as wn, validateComposition as wr, buildStreamParamsConfigSchema as wt, DATABASE_SNAPSHOT_TIMEOUT_MS as x, UnknownRecordKindError as xi, kebabToCamel as xn, streamQualityLabel as xr, buildCapabilityLookup as xt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as y, SECRET_CLEAR as yi, isObjectInput as yn, storageProviderCapability as yr, bareAddonId as yt, HUB_MDNS_TXT_KEYS as z, expandCapMethods as zi, normalizeUnit as zn, createStatefulExpressionMemory as zr, databaseSnapshotCapability as zt };
88473
+ export { PreferenceNamespaceSchema as $, isSecretMarker as $i, procedureAuthKey as $n, BaseAddon as $r, deviceHistoryCapability as $t, DEVICE_SAN_USER_PREFIX as A, asJsonObject as Ai, keychainCapability as An, userManagementCapability as Ar, buildStreamParamsConfigSchema as At, HUB_MDNS_SERVICE_TYPE as B, customAction as Bi, mayWriteToLocation as Bn, composedDeviceRef as Br, coreBlockIdFromAddonId as Bt, DATABASE_SNAPSHOT_TIMEOUT_MS as C, userError as Ca, RecordTooLargeError as Ci, isCredentialTokenPayload as Cn, storageCapability as Cr, authProviderCapability as Ct, DEVICE_ENROLLMENT_TTL_MS as D, UnindexedFilterError as Di, isVoidInput as Dn, streamCatalogCapability as Dr, buildCapabilityLookup as Dt, DERIVED_CAMERA_SILENCED_CAP_NAMES as E, SECRET_CLEAR as Ei, isObjectInput as En, storageProviderCapability as Er, batteryCapability as Et, DeviceTombstoneSchema as F, collectSecretConfigKeys as Fi, locationIconKey as Fn, vectorStoreCapability as Fr, composerCapability as Ft, LOG_LEVEL_RANK as G, emitReadiness as Gi, normalizeCoreBlockWrite as Gn, compositionSourceKey as Gr, databaseSnapshotCapability as Gt, KEYCHAIN_RESET_TRIGGER_ACTOR as H, defineCustomActions as Hi, metricsProviderCapability as Hn, compositionFeatureEnabled as Hr, coreBlocksCapability as Ht, FIRST_LEVEL_MACRO_CLASSES as I, collectSecretLeaves as Ii, logDestinationCapability as In, withLocationMode as Ir, compositionFieldKey as It, MINUTES_PER_DAY as J, hydrateSchema as Ji, objectInputDeclaresRequiredDeviceId as Jn, toExpressionValue as Jr, defineExtensionSlotProvider as Jt, LegacyStorageLocationDefaultSchema as K, expandCapMethods as Ki, normalizeUnit as Kn, createStatefulExpressionMemory as Kr, declarationOwnerNodeId as Kt, FieldClaimModeSchema as L, collectSecretMarkerRefs as Li, logLevelAtMost as Ln, COMPOSER_ADDON_ID as Lr, compositionSourceRefs as Lt, DataStoreDatabaseSchema as M, asString$1 as Mi, legacyModeOf as Mn, validateCustomAddress as Mr, cameraGridLayoutCapability as Mt, DeclaredDevices as N, assertValidDeclaration as Ni, lifecycleJobSchema as Nn, vectorDimFromBase64 as Nr, canonicalIconKey as Nt, DEVICE_NONCE_TTL_MS as O, UnknownRecordKindError as Oi, kebabToCamel as On, streamQualityLabel as Or, buildDeviceEnrollmentLink as Ot, DeviceStatusSchema as P, buildSecretRef as Pi, localNetworkCapability as Pn, vectorIndexDimConflictError as Pr, checkRoleAddress as Pt, PreferenceDeviceIdSchema as Q, isSecretClear as Qi, platformProbeCapability as Qn, errMsg as Qr, deviceExtensionCapability as Qt, FieldClaimSchema as R, collectZodSecretPaths as Ri, looseSchema as Rn, buildFfmpegArgs as Rr, coreBlockAddonId as Rt, DATABASE_SNAPSHOT_SUFFIX as S, transformSecretWrite as Sa, RecordNotFoundError as Si, isCollectionArrayMethod as Sn, storageAdminCapability as Sr, armRemovalReconcile as St, DAY_NAMES as T, EventCategory as Ta, RevConflictError as Ti, isLocationEnabled as Tn, storageOccupancyCapability as Tr, bareAddonId as Tt, KeychainAuditEntrySchema as U, defineRecordKinds as Ui, modeMayWrite as Un, compositionItemFieldPath as Ur, createDeviceExtensionProvider as Ut, HUB_MDNS_TXT_KEYS as V, declarationsOf as Vi, memoizePinnedFfmpeg as Vn, composedDeviceStableId as Vr, coreBlockSourceKind as Vt, KeychainResetRecordSchema as W, emitDownForOwnedCaps as Wi, motionCapability as Wn, compositionSliceKey as Wr, dataStoreProviderCapability as Wt, NetworkTunnelStartedDataSchema as X, isEvent as Xi, pickAppLinkHub as Xn, DeviceRole as Xr, describeComposableCaps as Xt, MOTION_CLOSE_AFTER_MS as Y, isDeviceConfigCap as Yi, parseStreamParamsFormPatch as Yn, DeviceFeature as Yr, deriveBatteryPresence as Yt, PREFERENCES_MAX_VALUE_BYTES as Z, isKeychainStoredField as Zi, planComposition as Zn, DeviceType as Zr, deviceCredentialsCapability as Zt, CalendarPreferencesSchema as _, secretTreeFromPaths as _a, REMOVE_LEAF as _i, interpolate as _n, settingsStoreCapability as _r, addonSettingsCapability as _t, ApiKeyRecordSchema as a, normalizeNodeId as aa, DeclarationRefusedError as ai, enumerateItemArrayFields as an, resolveAppConnections as ar, STORAGE_ADMIN_SCOPED_BASES as at, CredentialTokenClaimsSchema as b, toNodeId as ba, ReadinessTimeoutError as bi, isAppLinkBase as bn, snapshotCapability as br, alertEpisodePayload as bt, CAMERA_SWITCH_ORDER as c, parseJsonUnknown as ca, HISTORY_DEFAULT_MIN_INTERVAL_MS as ci, evictionPolicyOfLocation as cn, resolveCoreBlockFiles as cr, ServerNameSchema as ct, CATALOG_LANGS as d, parseSettingsBrokersAdoptsFrom as da, PlaintextSecretError as di, extractNestedAddonId as dn, resolveMethodAuth as dr, StorageLocationModeSchema as dt, isSecretMarkerLike as ea, BatchTooLargeError as ei, deviceManagerCapability as en, ptzAutotrackCapability as er, PreferenceValueSchema as et, COMPOSED_ITEM_FIXED_FIELDS as f, readinessKey as fa, RECORD_BATCH_MAX as fi, filesystemBrowseCapability as fn, resolveNotificationTapAddress as fr, StorageLocationTypeSchema as ft, CREDENTIAL_TOKEN_AUDIENCE as g, scopeKey as ga, REDACTED_SECRET as gi, gbToBytes as gn, scoreRuntimes as gr, addonPagesCapability as gt, CORE_BLOCK_ADDON_PREFIX as h, resolveSecretMarkers as ha, RECORD_SWEEP_INTERVAL_MS as hi, formatMinutes as hn, scopesAllowDeviceCap as hr, UserRecordSchema as ht, AlertSchema as i, nodePin as ia, DEVICE_STATUS_METHOD as ii, enumerateInferenceDevices as in, replacedFieldKeys as ir, STORAGE_ADMIN_MOVED_COLLECTIONS as it, DEVICE_TOMBSTONE_RETENTION_MS as j, asNumber as ji, legacyAutoLinkIds as jn, validateComposition as jr, calendarsCapability as jt, DEVICE_SAN_CREDENTIAL_PREFIX as k, WELL_KNOWN_TAB_MAP as ki, keychainAdminCapability as kn, supportedRuntimes as kr, buildDeviceSignatureMessage as kt, CAMSTACK_APP_LINK_ORIGIN as l, parseSecretRef as la, InvalidRecordError as li, expandContainer as ln, resolveHubAddressRoles as lr, SsoBridgeClaimsSchema as lt, CORE_BLOCKS_ADDON_ID as m, resolveCapMount as ma, RECORD_DELETE_BATCH as mi, formatDeviceRevoker as mn, scopesAllowAddon as mr, TokenScopeSchema as mt, AGENT_MDNS_TXT_KEYS as n, makeSecretMarker as na, DATAPLANE_SECRET_HEADER as ni, deviceStateCapability as nn, recordsCapability as nr, RecordingStatusSchema as nt, BaseDevice as o, normalizeSecretOwner as oa, FilterRequiredError as oi, enumerateSchemaFields as on, resolveBucketMs as or, STREAM_PROFILE_META as ot, COMPOSER_RUNNER_ID as p, recordSecretRef as pa, RECORD_BATCH_MAX_BYTES as pi, foldSnapshotByFunction as pn, runtimeStatePolicyFor as pr, StorageMigrationJobSchema as pt, METHOD_ACCESS_MAP as q, formatSecretScope as qi, objectInputDeclaresAddonId as qn, disarmRoseMemory as qr, decodeVectorBase64 as qt, ALL_CAPABILITY_DEFINITIONS as r, mapSecretLeaves as ra, DEVICE_SETTINGS_CONTRIBUTION_METHODS as ri, deviceStatusCapability as rn, reducePoints as rr, STORAGE_ACCESS_FALLBACK as rt, BatteryStatusSchema as s, parseJsonObject as sa, ForeignSecretMarkerError as si, evaluateCompositionField as sn, resolveCoreBlockEntry as sr, ScopedTokenSchema as st, AGENT_MDNS_SERVICE_TYPE as t, isSecretRefOwnedBy as ta, CALLER_STAMPED_CAPABILITIES as ti, deviceRemovalHookCapability as tn, recordEntriesCapability as tr, RECORDING_SOURCE_CAMSTACK_ADDON as tt, CAP_NAMES_WITH_STATUS as u, parseSettingsArrayAdoptsFrom as ua, NoCallerError as ui, expressionContainsBuiltinCall as un, resolveLocationMode as ur, StorageCleanupJobSchema as ut, CatalogFileSchema as v, secretTreeFromSchema as va, RUNTIME_DEFAULTS as vi, isAlertEpisodeOpen as vn, shortHostname as vr, addonWidgetsCapability as vt, DATA_STORE_DATABASES as w, withoutCallerStamp as wa, RecordUniqueViolationError as wi, isDefaultAppConnectionEndpoint as wn, storageMigrationCapability as wr, backupCapability as wt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as x, toSecretFieldView as xa, RecordKindDeclarationSchema as xi, isArrayOutputSchema as xn, splitTranslationRef as xr, alertsCapability as xt, CoreBlockSchema as y, sleep as ya, ReadinessRegistry as yi, isAlertEpisodeSeverity as yn, siteZoneKey as yr, alertEpisodeId as yt, HISTORY_CATALOG as z, createEvent as zi, mayReadLocation as zn, cloneStatefulExpressionMemory as zr, coreBlockComposition as zt };