@camstack/system 1.2.454 → 1.2.455

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 (83) hide show
  1. package/dist/{agent-https-B7IjRRzT.js → agent-https-CCvlRQKV.js} +2 -2
  2. package/dist/{agent-https-oXsR24R2.mjs → agent-https-CLWrOO3o.mjs} +2 -2
  3. package/dist/auth/auth-audit-log.d.ts +1 -1
  4. package/dist/auth/auth-manager.d.ts +7 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +2 -2
  10. package/dist/builtins/alerts/alerts.addon.mjs +2 -2
  11. package/dist/builtins/autotrack/index.js +1 -1
  12. package/dist/builtins/autotrack/index.mjs +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  15. package/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/dist/builtins/camera-grid/index.js +1 -1
  18. package/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/dist/builtins/composer/composer.addon.js +2 -2
  20. package/dist/builtins/composer/composer.addon.mjs +2 -2
  21. package/dist/builtins/console-logging/index.js +1 -1
  22. package/dist/builtins/console-logging/index.mjs +1 -1
  23. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  24. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  25. package/dist/builtins/device-history/device-history.addon.js +1 -1
  26. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  27. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  28. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  29. package/dist/builtins/hub-forwarder/index.js +1 -1
  30. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  31. package/dist/builtins/keychain/index.js +4 -4
  32. package/dist/builtins/keychain/index.mjs +4 -4
  33. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  35. package/dist/builtins/local-auth/local-auth.addon.js +14 -4
  36. package/dist/builtins/local-auth/local-auth.addon.mjs +14 -4
  37. package/dist/builtins/local-network/local-network.addon.js +2 -2
  38. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  39. package/dist/builtins/loki-logging/index.js +1 -1
  40. package/dist/builtins/loki-logging/index.mjs +1 -1
  41. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  42. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  43. package/dist/builtins/platform-probe/index.js +1 -1
  44. package/dist/builtins/platform-probe/index.mjs +1 -1
  45. package/dist/builtins/record-entries/index.js +1 -1
  46. package/dist/builtins/record-entries/index.mjs +1 -1
  47. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  48. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  49. package/dist/builtins/snapshot/index.js +1 -1
  50. package/dist/builtins/snapshot/index.mjs +1 -1
  51. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  52. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  53. package/dist/builtins/sqlite-storage/index.js +1 -1
  54. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  55. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  56. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  57. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  58. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  59. package/dist/builtins/system-config/system-config.addon.js +3 -3
  60. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  61. package/dist/builtins/winston-logging/index.js +1 -1
  62. package/dist/builtins/winston-logging/index.mjs +1 -1
  63. package/dist/{composition-sources-Cukc78eu.js → composition-sources-BxUkLNSo.js} +1 -1
  64. package/dist/{composition-sources-bt6IQDLu.mjs → composition-sources-CSzD5_qX.mjs} +1 -1
  65. package/dist/{constants-DQcVrhVI.mjs → constants-DOlYt1t1.mjs} +1 -1
  66. package/dist/{constants-DBGG6Zu5.js → constants-DruwCkfp.js} +1 -1
  67. package/dist/{device-ca-B3hUVfYk.js → device-ca-QPBgfqVY.js} +1 -1
  68. package/dist/{device-ca-Utfvsx5x.mjs → device-ca-uFbTyY_o.mjs} +1 -1
  69. package/dist/{dist-7ZciHCIp.mjs → dist-BpSENkRJ.mjs} +236 -197
  70. package/dist/{dist-Bi4Ioxop.js → dist-DjQ8C-ku.js} +241 -196
  71. package/dist/file-host-worker.js +1 -1
  72. package/dist/file-host-worker.mjs +1 -1
  73. package/dist/{hub-mdns-ciao-2FzLWfbD.js → hub-mdns-ciao-Bkrvgnma.js} +2 -2
  74. package/dist/{hub-mdns-ciao-BRs3DUT-.mjs → hub-mdns-ciao-DlgkFJVY.mjs} +2 -2
  75. package/dist/index.js +7 -7
  76. package/dist/index.mjs +7 -7
  77. package/dist/{phase6-declare-gate-DwYAep7y.js → phase6-declare-gate-DrmTtz7F.js} +1 -1
  78. package/dist/{phase6-declare-gate-D-2LMw9o.mjs → phase6-declare-gate-JQUqgQgq.mjs} +1 -1
  79. package/dist/{restore-archive-C0ymYQk7.js → restore-archive-4OP0EYg6.js} +1 -1
  80. package/dist/{restore-archive-UVZv_hmr.mjs → restore-archive-YFSJRtKy.mjs} +1 -1
  81. package/dist/{wal-maintenance-Bo_lo3Dh.js → wal-maintenance-Bl0ZKjVR.js} +0 -0
  82. package/dist/{wal-maintenance-Df89xxrK.mjs → wal-maintenance-TyuOEVy1.mjs} +0 -0
  83. package/package.json +1 -1
@@ -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 `csv_*` share token can carry. The hub mints
3262
+ * and validates them (`share-token.service.ts` builds its enum from this
3263
+ * 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 = zod.z.object({
3262
3268
  /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
@@ -10392,6 +10398,235 @@ 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 `cst_*` tokens
10424
+ * with `isAdmin: false` + an explicit scope list.
10425
+ */
10426
+ /** Per-method access flavour. Materialised on every cap method via codegen. */
10427
+ var MethodAccessSchema = zod.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 = zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]);
10454
+ var AllowedDevicesSchema = zod.z.record(zod.z.string(), zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]));
10455
+ var CapScopeSchema = zod.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 = zod.z.discriminatedUnion("kind", [
10478
+ zod.z.object({ kind: zod.z.literal("all") }),
10479
+ zod.z.object({
10480
+ kind: zod.z.literal("ids"),
10481
+ ids: zod.z.array(zod.z.number().int()).min(1)
10482
+ }),
10483
+ zod.z.object({
10484
+ kind: zod.z.literal("types"),
10485
+ types: zod.z.array(zod.z.enum(DeviceType)).min(1)
10486
+ }),
10487
+ zod.z.object({
10488
+ kind: zod.z.literal("locations"),
10489
+ locations: zod.z.array(zod.z.string().min(1)).min(1)
10490
+ })
10491
+ ]);
10492
+ var DeviceTokenScopeSchema = zod.z.object({
10493
+ type: zod.z.literal("device"),
10494
+ /** The device SET this grant covers — resolved against the live fleet. */
10495
+ selector: DeviceSelectorSchema,
10496
+ access: zod.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: zod.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 = zod.z.preprocess(migrateLegacyTokenScope, zod.z.discriminatedUnion("type", [
10537
+ zod.z.object({
10538
+ type: zod.z.literal("category"),
10539
+ target: CapScopeSchema,
10540
+ access: zod.z.array(MethodAccessSchema).min(1)
10541
+ }),
10542
+ zod.z.object({
10543
+ type: zod.z.literal("capability"),
10544
+ target: zod.z.string(),
10545
+ access: zod.z.array(MethodAccessSchema).min(1)
10546
+ }),
10547
+ zod.z.object({
10548
+ type: zod.z.literal("addon"),
10549
+ target: zod.z.string(),
10550
+ access: zod.z.array(MethodAccessSchema).min(1)
10551
+ }),
10552
+ DeviceTokenScopeSchema
10553
+ ]));
10554
+ var UserRecordSchema = zod.z.object({
10555
+ id: zod.z.string(),
10556
+ username: zod.z.string(),
10557
+ passwordHash: zod.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: zod.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: zod.z.array(TokenScopeSchema).default([]),
10572
+ createdAt: zod.z.number(),
10573
+ updatedAt: zod.z.number()
10574
+ });
10575
+ var ApiKeyRecordSchema = zod.z.object({
10576
+ id: zod.z.string(),
10577
+ label: zod.z.string(),
10578
+ isAdmin: zod.z.boolean().default(false),
10579
+ allowedProviders: AllowedProviderSchema,
10580
+ allowedDevices: AllowedDevicesSchema,
10581
+ tokenHash: zod.z.string(),
10582
+ tokenPrefix: zod.z.string(),
10583
+ createdAt: zod.z.number(),
10584
+ lastUsedAt: zod.z.number().optional()
10585
+ });
10586
+ var ScopedTokenSchema = zod.z.object({
10587
+ id: zod.z.string(),
10588
+ userId: zod.z.string(),
10589
+ name: zod.z.string(),
10590
+ tokenHash: zod.z.string(),
10591
+ tokenPrefix: zod.z.string(),
10592
+ scopes: zod.z.array(TokenScopeSchema),
10593
+ expiresAt: zod.z.number().nullish(),
10594
+ lastUsedAt: zod.z.number().nullish(),
10595
+ createdAt: zod.z.number()
10596
+ });
10597
+ /** What a share-view grant lets its holder see. */
10598
+ var ShareViewGrantSchema = zod.z.object({
10599
+ kind: zod.z.enum(SHARE_VIEW_KINDS),
10600
+ deviceIds: zod.z.array(zod.z.number().int().nonnegative()).min(1).max(64),
10601
+ /** Talk-back, opt-in at mint time; absent means off. */
10602
+ talk: zod.z.boolean().optional()
10603
+ });
10604
+ var ShareViewScopeSchema = zod.z.object({
10605
+ type: zod.z.literal("share-view"),
10606
+ grant: ShareViewGrantSchema
10607
+ });
10608
+ var AddonRoutesScopeSchema = zod.z.object({
10609
+ type: zod.z.literal("addon-routes"),
10610
+ access: zod.z.array(MethodAccessSchema).min(1)
10611
+ });
10612
+ var CredentialScopeSchema = zod.z.union([
10613
+ zod.z.literal("*"),
10614
+ ShareViewScopeSchema,
10615
+ AddonRoutesScopeSchema,
10616
+ TokenScopeSchema
10617
+ ]);
10618
+ /**
10619
+ * The claims of a unified token (`auth.mintToken`). It carries no `exp`: its
10620
+ * row (looked up by `jti` on every verify, for revocation) holds the ONE
10621
+ * expiry, so a share link can be extended and a JWT clock can never disagree
10622
+ * with the row.
10623
+ */
10624
+ var CredentialTokenClaimsSchema = zod.z.object({
10625
+ kind: zod.z.literal("credential"),
10626
+ sub: zod.z.string().min(1),
10627
+ jti: zod.z.string().min(16),
10628
+ scopes: zod.z.array(CredentialScopeSchema).min(1)
10629
+ });
10395
10630
  zod.z.enum(["new-session", "step-up"]);
10396
10631
  /** The languages the hub's app landing pages are written in (D858). */
10397
10632
  var AppPageLangSchema = zod.z.enum(["en", "it"]);
@@ -46812,202 +47047,6 @@ var notificationRulesCapability = {
46812
47047
  }
46813
47048
  };
46814
47049
  /**
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 = zod.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 = zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]);
46867
- var AllowedDevicesSchema = zod.z.record(zod.z.string(), zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]));
46868
- var CapScopeSchema = zod.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 = zod.z.discriminatedUnion("kind", [
46891
- zod.z.object({ kind: zod.z.literal("all") }),
46892
- zod.z.object({
46893
- kind: zod.z.literal("ids"),
46894
- ids: zod.z.array(zod.z.number().int()).min(1)
46895
- }),
46896
- zod.z.object({
46897
- kind: zod.z.literal("types"),
46898
- types: zod.z.array(zod.z.enum(DeviceType)).min(1)
46899
- }),
46900
- zod.z.object({
46901
- kind: zod.z.literal("locations"),
46902
- locations: zod.z.array(zod.z.string().min(1)).min(1)
46903
- })
46904
- ]);
46905
- var DeviceTokenScopeSchema = zod.z.object({
46906
- type: zod.z.literal("device"),
46907
- /** The device SET this grant covers — resolved against the live fleet. */
46908
- selector: DeviceSelectorSchema,
46909
- access: zod.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: zod.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 = zod.z.preprocess(migrateLegacyTokenScope, zod.z.discriminatedUnion("type", [
46950
- zod.z.object({
46951
- type: zod.z.literal("category"),
46952
- target: CapScopeSchema,
46953
- access: zod.z.array(MethodAccessSchema).min(1)
46954
- }),
46955
- zod.z.object({
46956
- type: zod.z.literal("capability"),
46957
- target: zod.z.string(),
46958
- access: zod.z.array(MethodAccessSchema).min(1)
46959
- }),
46960
- zod.z.object({
46961
- type: zod.z.literal("addon"),
46962
- target: zod.z.string(),
46963
- access: zod.z.array(MethodAccessSchema).min(1)
46964
- }),
46965
- DeviceTokenScopeSchema
46966
- ]));
46967
- var UserRecordSchema = zod.z.object({
46968
- id: zod.z.string(),
46969
- username: zod.z.string(),
46970
- passwordHash: zod.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: zod.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: zod.z.array(TokenScopeSchema).default([]),
46985
- createdAt: zod.z.number(),
46986
- updatedAt: zod.z.number()
46987
- });
46988
- var ApiKeyRecordSchema = zod.z.object({
46989
- id: zod.z.string(),
46990
- label: zod.z.string(),
46991
- isAdmin: zod.z.boolean().default(false),
46992
- allowedProviders: AllowedProviderSchema,
46993
- allowedDevices: AllowedDevicesSchema,
46994
- tokenHash: zod.z.string(),
46995
- tokenPrefix: zod.z.string(),
46996
- createdAt: zod.z.number(),
46997
- lastUsedAt: zod.z.number().optional()
46998
- });
46999
- var ScopedTokenSchema = zod.z.object({
47000
- id: zod.z.string(),
47001
- userId: zod.z.string(),
47002
- name: zod.z.string(),
47003
- tokenHash: zod.z.string(),
47004
- tokenPrefix: zod.z.string(),
47005
- scopes: zod.z.array(TokenScopeSchema),
47006
- expiresAt: zod.z.number().nullish(),
47007
- lastUsedAt: zod.z.number().nullish(),
47008
- createdAt: zod.z.number()
47009
- });
47010
- /**
47011
47050
  * `oauth-integration` — a collection cap by which an addon declares
47012
47051
  * itself a linkable OAuth client of the hub's core `/oauth2/*` server.
47013
47052
  * Each provider returns a static descriptor; the core enumerates them
@@ -88456,6 +88495,12 @@ Object.defineProperty(exports, "CoreBlockSchema", {
88456
88495
  return CoreBlockSchema;
88457
88496
  }
88458
88497
  });
88498
+ Object.defineProperty(exports, "CredentialTokenClaimsSchema", {
88499
+ enumerable: true,
88500
+ get: function() {
88501
+ return CredentialTokenClaimsSchema;
88502
+ }
88503
+ });
88459
88504
  Object.defineProperty(exports, "DATABASE_SNAPSHOT_PARTIAL_SUFFIX", {
88460
88505
  enumerable: true,
88461
88506
  get: function() {
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-Bo_lo3Dh.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-Bl0ZKjVR.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-Df89xxrK.mjs";
1
+ import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-TyuOEVy1.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-Bi4Ioxop.js");
2
+ const require_dist = require("./dist-DjQ8C-ku.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.js");
4
- const require_agent_https = require("./agent-https-B7IjRRzT.js");
4
+ const require_agent_https = require("./agent-https-CCvlRQKV.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { ga as userError } from "./dist-7ZciHCIp.mjs";
2
+ import { _a as userError } from "./dist-BpSENkRJ.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-DK__ETIe.mjs";
4
- import { A as isConstrainedCa, E as reasonRequiresNewCa, M as permitsIdentity, P as readNameConstraints, T as evaluateExistingCert, _ as issueLeaf, g as generateCa, v as loadCa, y as collectCertIdentity } from "./agent-https-oXsR24R2.mjs";
4
+ import { A as isConstrainedCa, E as reasonRequiresNewCa, M as permitsIdentity, P as readNameConstraints, T as evaluateExistingCert, _ as issueLeaf, g as generateCa, v as loadCa, y as collectCertIdentity } from "./agent-https-CLWrOO3o.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { mkdir, writeFile } from "node:fs/promises";
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-Bi4Ioxop.js");
3
+ const require_dist = require("./dist-DjQ8C-ku.js");
4
4
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
5
- const require_device_ca = require("./device-ca-B3hUVfYk.js");
5
+ const require_device_ca = require("./device-ca-QPBgfqVY.js");
6
6
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
7
7
  require("./builtins/alerts/index.js");
8
8
  const require_builtins_calendars_calendars_addon = require("./builtins/calendars/calendars.addon.js");
@@ -27,21 +27,21 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
27
27
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
28
28
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
29
29
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
30
- const require_wal_maintenance = require("./wal-maintenance-Bo_lo3Dh.js");
30
+ const require_wal_maintenance = require("./wal-maintenance-Bl0ZKjVR.js");
31
31
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
32
32
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
33
33
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
34
34
  require("./builtins/storage-orchestrator/index.js");
35
- const require_constants = require("./constants-DBGG6Zu5.js");
36
- const require_agent_https = require("./agent-https-B7IjRRzT.js");
35
+ const require_constants = require("./constants-DruwCkfp.js");
36
+ const require_agent_https = require("./agent-https-CCvlRQKV.js");
37
37
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
38
38
  require("./builtins/system-config/index.js");
39
39
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
40
40
  const require_custom_action_registry = require("./custom-action-registry-COyb49zm.js");
41
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-2FzLWfbD.js");
41
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-Bkrvgnma.js");
42
42
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
43
43
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
44
- const require_restore_archive = require("./restore-archive-C0ymYQk7.js");
44
+ const require_restore_archive = require("./restore-archive-4OP0EYg6.js");
45
45
  let zod = require("zod");
46
46
  let node_crypto = require("node:crypto");
47
47
  node_crypto = require_chunk.__toESM(node_crypto);
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { An as logLevelAtMost, Bn as objectInputDeclaresAddonId, Ci as asJsonObject$1, En as lifecycleJobSchema, G as METHOD_ACCESS_MAP, Gr as errMsg$1, Ii as defineRecordKinds, Jr as CALLER_STAMPED_CAPABILITIES$1, Kn as procedureAuthKey, Li as emitDownForOwnedCaps, Mi as createEvent$1, Sr as supportedRuntimes, Ti as asString$1, U as LOG_LEVEL_RANK, Vn as objectInputDeclaresRequiredDeviceId, Xr as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Yr as DATAPLANE_SECRET_HEADER$1, Zr as DEVICE_STATUS_METHOD, _ as CatalogFileSchema, _a as withoutCallerStamp, aa as readinessKey, an as extractNestedAddonId, bn as isVoidInput, cr as scopesAllowDeviceCap, d as CATALOG_LANGS, di as RUNTIME_DEFAULTS, dn as interpolate, dt as addonSettingsCapability, ea as parseJsonObject, fi as ReadinessRegistry, ga as userError, gn as isCollectionArrayMethod, hn as isArrayOutputSchema, ir as resolveMethodAuth, jn as looseSchema, la as scopeKey, mr as splitTranslationRef, n as AGENT_MDNS_TXT_KEYS, pi as ReadinessTimeoutError, r as ALL_CAPABILITY_DEFINITIONS, sa as resolveCapMount, sr as scopesAllowAddon, t as AGENT_MDNS_SERVICE_TYPE, ta as parseJsonUnknown, va as EventCategory$1, wi as asNumber, xn as kebabToCamel$1, yn as isObjectInput, zi as expandCapMethods } from "./dist-7ZciHCIp.mjs";
2
+ import { Bi as expandCapMethods, Cr as supportedRuntimes, Dn as lifecycleJobSchema, Ei as asString$1, Hn as objectInputDeclaresRequiredDeviceId, K as METHOD_ACCESS_MAP, Kr as errMsg$1, Li as defineRecordKinds, Mn as looseSchema, Ni as createEvent$1, Qr as DEVICE_STATUS_METHOD, Ri as emitDownForOwnedCaps, Sn as kebabToCamel$1, Ti as asNumber, Vn as objectInputDeclaresAddonId, W as LOG_LEVEL_RANK, Xr as DATAPLANE_SECRET_HEADER$1, Yr as CALLER_STAMPED_CAPABILITIES$1, Zr as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _ as CatalogFileSchema, _a as userError, _n as isCollectionArrayMethod, ar as resolveMethodAuth, bn as isObjectInput, ca as resolveCapMount, cr as scopesAllowAddon, d as CATALOG_LANGS, fi as RUNTIME_DEFAULTS, fn as interpolate, ft as addonSettingsCapability, gn as isArrayOutputSchema, hr as splitTranslationRef, jn as logLevelAtMost, lr as scopesAllowDeviceCap, mi as ReadinessTimeoutError, n as AGENT_MDNS_TXT_KEYS, na as parseJsonUnknown, oa as readinessKey, on as extractNestedAddonId, pi as ReadinessRegistry, qn as procedureAuthKey, r as ALL_CAPABILITY_DEFINITIONS, t as AGENT_MDNS_SERVICE_TYPE, ta as parseJsonObject, ua as scopeKey, va as withoutCallerStamp, wi as asJsonObject$1, xn as isVoidInput, ya as EventCategory$1 } from "./dist-BpSENkRJ.mjs";
3
3
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
4
- import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Utfvsx5x.mjs";
4
+ import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-uFbTyY_o.mjs";
5
5
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
6
6
  import "./builtins/alerts/index.mjs";
7
7
  import { CalendarsAddon } from "./builtins/calendars/calendars.addon.mjs";
@@ -26,21 +26,21 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
26
26
  import NativeMetricsAddon, { a as NativeMetricsProvider, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
27
27
  import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
28
28
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
29
- import { l as SqliteSettingsBackend } from "./wal-maintenance-Df89xxrK.mjs";
29
+ import { l as SqliteSettingsBackend } from "./wal-maintenance-TyuOEVy1.mjs";
30
30
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
31
31
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
32
32
  import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
33
33
  import "./builtins/storage-orchestrator/index.mjs";
34
- import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-DQcVrhVI.mjs";
35
- import { $ as generateMeshKeyPair, A as isConstrainedCa, C as MAX_LEAF_VALIDITY_DAYS, D as PERMITTED_DNS_SUFFIXES, F as AGENT_HTTPS_NAMES_COLLECTION, G as describeMeshLeaf, H as MESH_NODE_CERTIFICATES_COLUMNS, I as AGENT_HTTPS_NAMES_COLUMNS, J as caFingerprint, K as getProcessMeshCertificateRegistry, L as AgentHttpsNames, M as permitsIdentity, N as permitsName, O as PERMITTED_IP_RANGES, P as readNameConstraints, Q as generateMeshCa, R as getProcessAgentHttpsNames, S as LEAF_RENEWAL_WINDOW_DAYS, T as evaluateExistingCert, U as MeshCertificateRegistry, V as MESH_NODE_CERTIFICATES_COLLECTION, W as RENEWAL_ABANDONED, X as createMeshCsrPem, Y as caFingerprintCompact, Z as exportMeshPrivateKeyPem, a as collectAgentNames, b as systemHostFacts, c as installAgentHttps, d as issueAgentHttpsLeaf, et as isValidAgentNodeId, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isLocalOnlyHostname, k as buildNameConstraintSet, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, nt as issueMeshLeafFromCsr, o as createAgentHttpsRequest, p as pemDigest, q as setProcessMeshCertificateRegistry, r as agentHttpsPaths, rt as loadMeshCa, s as describeHttpsLeaf, t as AgentHttpsInstallError, tt as issueMeshLeafForNode, u as isPrivateAddress, w as SERVER_AUTH_OID, x as CA_VALIDITY_DAYS, y as collectCertIdentity, z as setProcessAgentHttpsNames } from "./agent-https-oXsR24R2.mjs";
34
+ import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-DOlYt1t1.mjs";
35
+ import { $ as generateMeshKeyPair, A as isConstrainedCa, C as MAX_LEAF_VALIDITY_DAYS, D as PERMITTED_DNS_SUFFIXES, F as AGENT_HTTPS_NAMES_COLLECTION, G as describeMeshLeaf, H as MESH_NODE_CERTIFICATES_COLUMNS, I as AGENT_HTTPS_NAMES_COLUMNS, J as caFingerprint, K as getProcessMeshCertificateRegistry, L as AgentHttpsNames, M as permitsIdentity, N as permitsName, O as PERMITTED_IP_RANGES, P as readNameConstraints, Q as generateMeshCa, R as getProcessAgentHttpsNames, S as LEAF_RENEWAL_WINDOW_DAYS, T as evaluateExistingCert, U as MeshCertificateRegistry, V as MESH_NODE_CERTIFICATES_COLLECTION, W as RENEWAL_ABANDONED, X as createMeshCsrPem, Y as caFingerprintCompact, Z as exportMeshPrivateKeyPem, a as collectAgentNames, b as systemHostFacts, c as installAgentHttps, d as issueAgentHttpsLeaf, et as isValidAgentNodeId, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isLocalOnlyHostname, k as buildNameConstraintSet, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, nt as issueMeshLeafFromCsr, o as createAgentHttpsRequest, p as pemDigest, q as setProcessMeshCertificateRegistry, r as agentHttpsPaths, rt as loadMeshCa, s as describeHttpsLeaf, t as AgentHttpsInstallError, tt as issueMeshLeafForNode, u as isPrivateAddress, w as SERVER_AUTH_OID, x as CA_VALIDITY_DAYS, y as collectCertIdentity, z as setProcessAgentHttpsNames } from "./agent-https-CLWrOO3o.mjs";
36
36
  import { $ as parseCidrList, A as setProcessMeshPeerTransportLookup, B as requireProcessMeshCa, C as setProcessMeshTlsEnabler, D as getProcessPeerLeaf, E as getProcessNodeMeshTransport, F as setProcessMeshTlsListenerState, G as AGENT_UI_UNLOCK_VERSION, H as AGENT_UI_UNLOCK_TTL_MS, I as MeshCrl, J as mintAgentUiUnlockTicket, K as UnlockTicketJtiStore, L as processMeshCrl, M as revokeMeshCertificate, N as getProcessMeshTlsListenerState, O as isProcessVerifiedMeshPeer, P as openMeshTlsWhenRevocationsLoaded, Q as normalizeIp, R as MeshCaKeeper, S as ServiceBroker, SystemConfigAddon, T as emitProcessNodeRegistered, U as AGENT_UI_UNLOCK_TYP, V as AGENT_DASHBOARD_ORIGINS_FIELD, W as AGENT_UI_UNLOCK_USE, X as verifyAgentUiUnlockTicket, Y as parseAgentDashboardOrigins, Z as createCidrMatcher, _ as signPairingProof, a as hubHostFromMeshAddress, b as TlsTcpTransporter, c as PAIRING_MAX_SESSIONS, d as PAIRING_PROTOCOL, et as readCidrSetting, f as PAIRING_TTL_MS, g as keyFingerprintShort, h as describeCsr, i as AgentPairing, j as renewMeshCertificate, k as onProcessNodeRegistered, l as PAIRING_PATHS, m as computePairingSas, n as HubPairing, o as PAIRING_CODE_DIGITS, p as computePairingCommitment, q as isAllowedAgentDashboardReturnTo, r as PairingHttpError, s as PAIRING_MAX_CODE_ATTEMPTS, u as PAIRING_PIN_DIGITS, v as verifyPairingProof, w as dropProcessPeer, x as Errors, y as MESH_TLS_PORT_HELLO_FIELD, z as getProcessMeshCaState } from "./builtins/system-config/system-config.addon.mjs";
37
37
  import "./builtins/system-config/index.mjs";
38
38
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
39
39
  import { C as isModelDownloaded, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-stpC3Zy-.mjs";
40
- import { A as allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-BRs3DUT-.mjs";
40
+ import { A as allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-DlgkFJVY.mjs";
41
41
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
42
42
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
43
- import { c as backupOrchestratorRecordKinds, f as BackupDecryptError, g as generateBackupKeyPair, l as backupRecordStoresOf, m as BackupKeyMismatchError, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, v as readBackupEncryptionHeader } from "./restore-archive-UVZv_hmr.mjs";
43
+ import { c as backupOrchestratorRecordKinds, f as BackupDecryptError, g as generateBackupKeyPair, l as backupRecordStoresOf, m as BackupKeyMismatchError, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, v as readBackupEncryptionHeader } from "./restore-archive-YFSJRtKy.mjs";
44
44
  import { z } from "zod";
45
45
  import * as crypto$1 from "node:crypto";
46
46
  import { createHash, randomBytes, randomUUID } from "node:crypto";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-Bi4Ioxop.js");
1
+ const require_dist = require("./dist-DjQ8C-ku.js");
2
2
  //#region src/builtins/records/legacy-table-row-count.ts
3
3
  /** Row count for a physical settings-db table (matches the records engine `legacyRowCount`). */
4
4
  function legacyTableRowCountFromList(tables, collection) {
@@ -1,4 +1,4 @@
1
- import { Pi as declarationsOf } from "./dist-7ZciHCIp.mjs";
1
+ import { Fi as declarationsOf } from "./dist-BpSENkRJ.mjs";
2
2
  //#region src/builtins/records/legacy-table-row-count.ts
3
3
  /** Row count for a physical settings-db table (matches the records engine `legacyRowCount`). */
4
4
  function legacyTableRowCountFromList(tables, collection) {
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-Bi4Ioxop.js");
2
+ const require_dist = require("./dist-DjQ8C-ku.js");
3
3
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { A as DataStoreDatabaseSchema, Ii as defineRecordKinds, b as DATABASE_SNAPSHOT_SUFFIX } from "./dist-7ZciHCIp.mjs";
1
+ import { Li as defineRecordKinds, j as DataStoreDatabaseSchema, x as DATABASE_SNAPSHOT_SUFFIX } from "./dist-BpSENkRJ.mjs";
2
2
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
3
3
  import { z } from "zod";
4
4
  import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.454",
3
+ "version": "1.2.455",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",