@camstack/system 1.2.457 → 1.2.459

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 (106) hide show
  1. package/dist/addon-runner.js +163 -27
  2. package/dist/addon-runner.mjs +193 -57
  3. package/dist/{agent-https-CoyOZ3pC.js → agent-https-Dnr_nIVx.js} +3 -723
  4. package/dist/{agent-https-CK9Z4sSR.mjs → agent-https-Iw3RSQup.mjs} +4 -616
  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 +5 -7
  10. package/dist/builtins/alerts/alerts.addon.mjs +5 -7
  11. package/dist/builtins/alerts/record-kinds.d.ts +1 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +242 -4
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +240 -2
  16. package/dist/builtins/calendars/calendars.addon.js +2 -10
  17. package/dist/builtins/calendars/calendars.addon.mjs +2 -3
  18. package/dist/builtins/calendars/record-kinds.d.ts +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 +4 -6
  26. package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
  27. package/dist/builtins/device-history/device-history.addon.d.ts +13 -0
  28. package/dist/builtins/device-history/device-history.addon.js +296 -233
  29. package/dist/builtins/device-history/device-history.addon.mjs +296 -233
  30. package/dist/builtins/device-history/ingest/producer-ingest.d.ts +11 -1
  31. package/dist/builtins/device-manager/device-manager.addon.js +2 -4
  32. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
  33. package/dist/builtins/hub-forwarder/index.js +1 -1
  34. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  35. package/dist/builtins/keychain/index.js +41 -43
  36. package/dist/builtins/keychain/index.mjs +41 -43
  37. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  38. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  39. package/dist/builtins/local-auth/local-auth.addon.js +24 -40
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +24 -40
  41. package/dist/builtins/local-network/local-network.addon.js +2 -2
  42. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  43. package/dist/builtins/loki-logging/index.js +1 -1
  44. package/dist/builtins/loki-logging/index.mjs +1 -1
  45. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  47. package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +1 -2
  48. package/dist/builtins/platform-probe/coral-accelerators.d.ts +26 -9
  49. package/dist/builtins/platform-probe/index.js +11 -68
  50. package/dist/builtins/platform-probe/index.mjs +11 -68
  51. package/dist/builtins/record-entries/index.js +1 -1
  52. package/dist/builtins/record-entries/index.mjs +1 -1
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/snapshot/index.js +1 -1
  56. package/dist/builtins/snapshot/index.mjs +1 -1
  57. package/dist/builtins/sqlite-storage/file-host-protocol.d.ts +0 -15
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  60. package/dist/builtins/sqlite-storage/index.js +1 -1
  61. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  62. package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -44
  63. package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
  64. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
  65. package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
  66. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
  67. package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
  68. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
  69. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
  70. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
  71. package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
  72. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
  73. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
  74. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
  75. package/dist/builtins/system-config/system-config.addon.js +667 -40
  76. package/dist/builtins/system-config/system-config.addon.mjs +625 -15
  77. package/dist/builtins/winston-logging/index.js +1 -1
  78. package/dist/builtins/winston-logging/index.mjs +1 -1
  79. package/dist/{composition-sources-B_jeZDRJ.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
  80. package/dist/{composition-sources-qKyvMAvc.js → composition-sources-b0e_2I-D.js} +1 -1
  81. package/dist/{constants-B_X9cWEK.js → constants-6OeJiZgi.js} +1 -1
  82. package/dist/{constants-cxKcZRMi.mjs → constants-BnkOdj9Q.mjs} +1 -1
  83. package/dist/coral-accelerators-Bi_c3Rft.js +175 -0
  84. package/dist/coral-accelerators-DcnZvctM.mjs +162 -0
  85. package/dist/{device-ca-BB6nHAL5.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
  86. package/dist/{device-ca-CVK3YcR_.js → device-ca-CPTDs--d.js} +1 -1
  87. package/dist/{dist-C89nqNnn.js → dist-Bn-RNanh.js} +84 -140
  88. package/dist/{dist-Dhux90yB.mjs → dist-Wy8cTxg6.mjs} +85 -123
  89. package/dist/file-host-worker.js +1 -1
  90. package/dist/file-host-worker.mjs +1 -1
  91. package/dist/{hub-mdns-ciao-B8olZqqd.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
  92. package/dist/{hub-mdns-ciao-DB1Y9agt.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
  93. package/dist/index.js +32 -58
  94. package/dist/index.mjs +16 -42
  95. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +7 -3
  96. package/dist/{restore-archive-DyOaPeAr.mjs → restore-archive-CmP-iiG9.mjs} +84 -331
  97. package/dist/{restore-archive-4DOUR5Gu.js → restore-archive-DM1OBYq4.js} +89 -342
  98. package/dist/{wal-maintenance-DVN-DiVP.js → wal-maintenance-DUHEp_09.js} +0 -0
  99. package/dist/{wal-maintenance-BMiX6UIa.mjs → wal-maintenance-NKbwWovZ.mjs} +0 -0
  100. package/package.json +1 -1
  101. package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
  102. package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
  103. package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
  104. package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
  105. package/dist/phase6-declare-gate-BO-_jLh_.js +0 -98
  106. package/dist/phase6-declare-gate-x9ZCbQJP.mjs +0 -93
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-C89nqNnn.js");
6
+ const require_dist = require("../../dist-Bn-RNanh.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Dhux90yB.mjs";
1
+ import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Wy8cTxg6.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -3,11 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-C89nqNnn.js");
6
+ const require_dist = require("../../dist-Bn-RNanh.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_device_ca = require("../../device-ca-CVK3YcR_.js");
9
- const require_phase6_declare_gate = require("../../phase6-declare-gate-BO-_jLh_.js");
10
- const require_constants = require("../../constants-B_X9cWEK.js");
8
+ const require_device_ca = require("../../device-ca-CPTDs--d.js");
9
+ const require_constants = require("../../constants-6OeJiZgi.js");
11
10
  const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
12
11
  let node_crypto = require("node:crypto");
13
12
  let _camstack_types_node = require("@camstack/types/node");
@@ -1072,6 +1071,42 @@ function errMsg(err) {
1072
1071
  return err instanceof Error ? err.message : String(err);
1073
1072
  }
1074
1073
  require_dist.EventCategory.KeychainChanged;
1074
+ var KeychainAuditBodySchema = require_dist.KeychainAuditEntrySchema.omit({
1075
+ id: true,
1076
+ at: true
1077
+ });
1078
+ var KeychainResetBodySchema = require_dist.KeychainResetRecordSchema.omit({
1079
+ id: true,
1080
+ at: true
1081
+ });
1082
+ var _keychainRecordKinds = require_dist.defineRecordKinds({
1083
+ audit: {
1084
+ schema: KeychainAuditBodySchema,
1085
+ class: "audit",
1086
+ writeTrigger: "one row per write / delete / rotation / reveal / recovery download",
1087
+ device: "none",
1088
+ at: "required",
1089
+ indexes: [{
1090
+ name: "audit_at",
1091
+ fields: ["at"]
1092
+ }],
1093
+ retention: {
1094
+ owner: "keychain",
1095
+ reason: "90 days and at most 20_000 rows, pruned at boot and daily"
1096
+ }
1097
+ },
1098
+ resets: {
1099
+ schema: KeychainResetBodySchema,
1100
+ class: "config",
1101
+ writeTrigger: "one row per keychain reset (System → Secrets, or the RESET_KEYCHAIN trigger file); acknowledgeReset stamps acknowledgedAt",
1102
+ device: "none",
1103
+ at: "required",
1104
+ retention: { none: "a handful of rows over a hub life; they name archive tables a reset left behind" }
1105
+ }
1106
+ });
1107
+ var keychainRecordKinds = _keychainRecordKinds;
1108
+ _keychainRecordKinds.audit;
1109
+ _keychainRecordKinds.resets;
1075
1110
  //#endregion
1076
1111
  //#region src/builtins/keychain/keychain-store.ts
1077
1112
  var import_read_all_rows = require_read_all_rows$1.require_read_all_rows();
@@ -1718,44 +1753,6 @@ var KeychainRepository = class {
1718
1753
  return row === void 0 ? null : toResetRecord(row.id, row.data);
1719
1754
  }
1720
1755
  };
1721
- var KeychainAuditBodySchema = require_dist.KeychainAuditEntrySchema.omit({
1722
- id: true,
1723
- at: true
1724
- });
1725
- var KeychainResetBodySchema = require_dist.KeychainResetRecordSchema.omit({
1726
- id: true,
1727
- at: true
1728
- });
1729
- var _keychainRecordKinds = require_dist.defineRecordKinds({
1730
- audit: {
1731
- schema: KeychainAuditBodySchema,
1732
- class: "audit",
1733
- writeTrigger: "one row per write / delete / rotation / reveal / recovery download",
1734
- device: "none",
1735
- at: "required",
1736
- indexes: [{
1737
- name: "audit_at",
1738
- fields: ["at"]
1739
- }],
1740
- retention: {
1741
- owner: "keychain",
1742
- reason: "90 days and at most 20_000 rows, pruned at boot and daily"
1743
- },
1744
- adoptsFrom: KEYCHAIN_AUDIT_COLLECTION
1745
- },
1746
- resets: {
1747
- schema: KeychainResetBodySchema,
1748
- class: "config",
1749
- writeTrigger: "one row per keychain reset (System → Secrets, or the RESET_KEYCHAIN trigger file); acknowledgeReset stamps acknowledgedAt",
1750
- device: "none",
1751
- at: "required",
1752
- retention: { none: "a handful of rows over a hub life; they name archive tables a reset left behind" },
1753
- adoptsFrom: KEYCHAIN_RESETS_COLLECTION
1754
- }
1755
- });
1756
- var keychainRecordKinds = _keychainRecordKinds;
1757
- _keychainRecordKinds.audit;
1758
- _keychainRecordKinds.resets;
1759
1756
  //#endregion
1760
1757
  //#region src/builtins/keychain/keychain-usage.ts
1761
1758
  /**
@@ -1953,8 +1950,9 @@ var KeychainAddon = class extends require_dist.BaseAddon {
1953
1950
  error: (message, meta) => ctx.logger.error(message, meta ? { meta } : void 0)
1954
1951
  };
1955
1952
  const records = ctx.records;
1953
+ if (records !== void 0) await records.declare(keychainRecordKinds);
1956
1954
  const service = new KeychainService({
1957
- repo: new KeychainRepository(door, records !== void 0 && await require_phase6_declare_gate.resolvePhase6UseRecordsPathForHub(ctx, "keychain", keychainRecordKinds, ["keychain:audit", "keychain:resets"]) && records !== void 0 ? KeychainRepository.recordStoresOf(records) : void 0),
1955
+ repo: new KeychainRepository(door, records !== void 0 ? KeychainRepository.recordStoresOf(records) : void 0),
1958
1956
  candidates: async () => {
1959
1957
  return buildKeySourceCandidates({
1960
1958
  config: readKeyConfig(await ctx.settings?.getSection("keychain") ?? {}),
@@ -1,8 +1,7 @@
1
- import { G as KeychainResetRecordSchema, Ki as defineRecordKinds, Mn as keychainAdminCapability, Nn as keychainCapability, Oa as EventCategory, U as KEYCHAIN_RESET_TRIGGER_ACTOR, W as KeychainAuditEntrySchema, Xi as formatSecretScope, fa as parseSecretRef, la as normalizeSecretOwner, ni as BaseAddon } from "../../dist-Dhux90yB.mjs";
1
+ import { G as KeychainResetRecordSchema, Gi as defineRecordKinds, Mn as keychainAdminCapability, Nn as keychainCapability, Ta as EventCategory, U as KEYCHAIN_RESET_TRIGGER_ACTOR, W as KeychainAuditEntrySchema, Yi as formatSecretScope, ca as normalizeSecretOwner, da as parseSecretRef, ni as BaseAddon } from "../../dist-Wy8cTxg6.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-BB6nHAL5.mjs";
4
- import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-x9ZCbQJP.mjs";
5
- import { a as MESH_CA_KEY_REF } from "../../constants-cxKcZRMi.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-Bnkw8GyU.mjs";
4
+ import { a as MESH_CA_KEY_REF } from "../../constants-BnkOdj9Q.mjs";
6
5
  import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
7
6
  import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
8
7
  import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
@@ -1066,6 +1065,42 @@ function errMsg(err) {
1066
1065
  return err instanceof Error ? err.message : String(err);
1067
1066
  }
1068
1067
  EventCategory.KeychainChanged;
1068
+ var KeychainAuditBodySchema = KeychainAuditEntrySchema.omit({
1069
+ id: true,
1070
+ at: true
1071
+ });
1072
+ var KeychainResetBodySchema = KeychainResetRecordSchema.omit({
1073
+ id: true,
1074
+ at: true
1075
+ });
1076
+ var _keychainRecordKinds = defineRecordKinds({
1077
+ audit: {
1078
+ schema: KeychainAuditBodySchema,
1079
+ class: "audit",
1080
+ writeTrigger: "one row per write / delete / rotation / reveal / recovery download",
1081
+ device: "none",
1082
+ at: "required",
1083
+ indexes: [{
1084
+ name: "audit_at",
1085
+ fields: ["at"]
1086
+ }],
1087
+ retention: {
1088
+ owner: "keychain",
1089
+ reason: "90 days and at most 20_000 rows, pruned at boot and daily"
1090
+ }
1091
+ },
1092
+ resets: {
1093
+ schema: KeychainResetBodySchema,
1094
+ class: "config",
1095
+ writeTrigger: "one row per keychain reset (System → Secrets, or the RESET_KEYCHAIN trigger file); acknowledgeReset stamps acknowledgedAt",
1096
+ device: "none",
1097
+ at: "required",
1098
+ retention: { none: "a handful of rows over a hub life; they name archive tables a reset left behind" }
1099
+ }
1100
+ });
1101
+ var keychainRecordKinds = _keychainRecordKinds;
1102
+ _keychainRecordKinds.audit;
1103
+ _keychainRecordKinds.resets;
1069
1104
  //#endregion
1070
1105
  //#region src/builtins/keychain/keychain-store.ts
1071
1106
  var import_read_all_rows = require_read_all_rows();
@@ -1712,44 +1747,6 @@ var KeychainRepository = class {
1712
1747
  return row === void 0 ? null : toResetRecord(row.id, row.data);
1713
1748
  }
1714
1749
  };
1715
- var KeychainAuditBodySchema = KeychainAuditEntrySchema.omit({
1716
- id: true,
1717
- at: true
1718
- });
1719
- var KeychainResetBodySchema = KeychainResetRecordSchema.omit({
1720
- id: true,
1721
- at: true
1722
- });
1723
- var _keychainRecordKinds = defineRecordKinds({
1724
- audit: {
1725
- schema: KeychainAuditBodySchema,
1726
- class: "audit",
1727
- writeTrigger: "one row per write / delete / rotation / reveal / recovery download",
1728
- device: "none",
1729
- at: "required",
1730
- indexes: [{
1731
- name: "audit_at",
1732
- fields: ["at"]
1733
- }],
1734
- retention: {
1735
- owner: "keychain",
1736
- reason: "90 days and at most 20_000 rows, pruned at boot and daily"
1737
- },
1738
- adoptsFrom: KEYCHAIN_AUDIT_COLLECTION
1739
- },
1740
- resets: {
1741
- schema: KeychainResetBodySchema,
1742
- class: "config",
1743
- writeTrigger: "one row per keychain reset (System → Secrets, or the RESET_KEYCHAIN trigger file); acknowledgeReset stamps acknowledgedAt",
1744
- device: "none",
1745
- at: "required",
1746
- retention: { none: "a handful of rows over a hub life; they name archive tables a reset left behind" },
1747
- adoptsFrom: KEYCHAIN_RESETS_COLLECTION
1748
- }
1749
- });
1750
- var keychainRecordKinds = _keychainRecordKinds;
1751
- _keychainRecordKinds.audit;
1752
- _keychainRecordKinds.resets;
1753
1750
  //#endregion
1754
1751
  //#region src/builtins/keychain/keychain-usage.ts
1755
1752
  /**
@@ -1947,8 +1944,9 @@ var KeychainAddon = class extends BaseAddon {
1947
1944
  error: (message, meta) => ctx.logger.error(message, meta ? { meta } : void 0)
1948
1945
  };
1949
1946
  const records = ctx.records;
1947
+ if (records !== void 0) await records.declare(keychainRecordKinds);
1950
1948
  const service = new KeychainService({
1951
- repo: new KeychainRepository(door, records !== void 0 && await resolvePhase6UseRecordsPathForHub(ctx, "keychain", keychainRecordKinds, ["keychain:audit", "keychain:resets"]) && records !== void 0 ? KeychainRepository.recordStoresOf(records) : void 0),
1949
+ repo: new KeychainRepository(door, records !== void 0 ? KeychainRepository.recordStoresOf(records) : void 0),
1952
1950
  candidates: async () => {
1953
1951
  return buildKeySourceCandidates({
1954
1952
  config: readKeyConfig(await ctx.settings?.getSection("keychain") ?? {}),
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-C89nqNnn.js");
3
+ const require_dist = require("../../dist-Bn-RNanh.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { Hi as createEvent, Oa as EventCategory, it as RecordingStatusSchema, ni as BaseAddon, nt as RECORDING_SOURCE_CAMSTACK_ADDON, ti as errMsg } from "../../dist-Dhux90yB.mjs";
1
+ import { Hi as createEvent, Ta as EventCategory, it as RecordingStatusSchema, ni as BaseAddon, nt as RECORDING_SOURCE_CAMSTACK_ADDON, ti as errMsg } from "../../dist-Wy8cTxg6.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -3,12 +3,11 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-C89nqNnn.js");
6
+ const require_dist = require("../../dist-Bn-RNanh.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
9
9
  const require_ms$1 = require("../../ms-LB3giGoU.js");
10
- const require_device_ca = require("../../device-ca-CVK3YcR_.js");
11
- const require_phase6_declare_gate = require("../../phase6-declare-gate-BO-_jLh_.js");
10
+ const require_device_ca = require("../../device-ca-CPTDs--d.js");
12
11
  let zod = require("zod");
13
12
  let node_crypto = require("node:crypto");
14
13
  node_crypto = require_chunk.__toESM(node_crypto);
@@ -7694,8 +7693,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7694
7693
  fields: ["username"],
7695
7694
  unique: true
7696
7695
  }],
7697
- retention: { none: "row goes only when an operator deletes the user; destructive declareCollection rebuild wipes all accounts" },
7698
- adoptsFrom: USERS_COLLECTION$1
7696
+ retention: { none: "row goes only when an operator deletes the user; destructive declareCollection rebuild wipes all accounts" }
7699
7697
  },
7700
7698
  "api-keys": {
7701
7699
  schema: ApiKeyBodySchema,
@@ -7707,8 +7705,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7707
7705
  name: "prefix",
7708
7706
  fields: ["tokenPrefix"]
7709
7707
  }],
7710
- retention: { none: "explicit revoke only" },
7711
- adoptsFrom: API_KEYS_COLLECTION
7708
+ retention: { none: "explicit revoke only" }
7712
7709
  },
7713
7710
  "scoped-tokens": {
7714
7711
  schema: ScopedTokenBodySchema,
@@ -7724,8 +7721,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7724
7721
  name: "user",
7725
7722
  fields: ["userId"]
7726
7723
  }],
7727
- retention: { none: "the operator drops the legacy rows by hand (D895)" },
7728
- adoptsFrom: SCOPED_TOKENS_COLLECTION
7724
+ retention: { none: "the operator drops the legacy rows by hand (D895)" }
7729
7725
  },
7730
7726
  "admin-tokens": {
7731
7727
  schema: AdminTokenBodySchema,
@@ -7741,8 +7737,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7741
7737
  name: "created_by",
7742
7738
  fields: ["createdBy"]
7743
7739
  }],
7744
- retention: { none: "the operator drops the legacy rows by hand (D895)" },
7745
- adoptsFrom: ADMIN_TOKENS_COLLECTION
7740
+ retention: { none: "the operator drops the legacy rows by hand (D895)" }
7746
7741
  },
7747
7742
  "login-sessions": {
7748
7743
  schema: LoginSessionBodySchema,
@@ -7760,8 +7755,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7760
7755
  retention: {
7761
7756
  owner: "local-auth",
7762
7757
  reason: "daily reap: expired >7d and revoked >30d"
7763
- },
7764
- adoptsFrom: LOGIN_SESSIONS_COLLECTION
7758
+ }
7765
7759
  },
7766
7760
  "login-session-cutoffs": {
7767
7761
  schema: LoginSessionCutoffBodySchema,
@@ -7769,8 +7763,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7769
7763
  writeTrigger: "revoke-all-sessions for a user (password change, delete, logout everywhere)",
7770
7764
  device: "none",
7771
7765
  at: "none",
7772
- retention: { none: "one row per user who ever had all sessions revoked" },
7773
- adoptsFrom: LOGIN_SESSION_CUTOFFS_COLLECTION
7766
+ retention: { none: "one row per user who ever had all sessions revoked" }
7774
7767
  },
7775
7768
  "oauth-sessions": {
7776
7769
  schema: OauthSessionBodySchema,
@@ -7785,8 +7778,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7785
7778
  retention: {
7786
7779
  owner: "local-auth",
7787
7780
  reason: "daily reap deletes revoked sessions older than 30 days; active rows never expire"
7788
- },
7789
- adoptsFrom: OAUTH_SESSIONS_COLLECTION
7781
+ }
7790
7782
  },
7791
7783
  "user-totp": {
7792
7784
  schema: UserTotpBodySchema,
@@ -7794,8 +7786,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7794
7786
  writeTrigger: "setup inserts seed (keychain); confirm sets confirmedAt; disable deletes row",
7795
7787
  device: "none",
7796
7788
  at: "none",
7797
- retention: { none: "disable or replace on re-setup; user delete does not cascade" },
7798
- adoptsFrom: USER_TOTP_COLLECTION
7789
+ retention: { none: "disable or replace on re-setup; user delete does not cascade" }
7799
7790
  },
7800
7791
  "user-external-identities": {
7801
7792
  schema: ExternalIdentityBodySchema,
@@ -7811,8 +7802,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7811
7802
  fields: ["provider", "subject"],
7812
7803
  unique: true
7813
7804
  }],
7814
- retention: { none: "unlink or deleteUser removes rows" },
7815
- adoptsFrom: USER_EXTERNAL_IDENTITIES_COLLECTION
7805
+ retention: { none: "unlink or deleteUser removes rows" }
7816
7806
  },
7817
7807
  "device-credentials": {
7818
7808
  schema: DeviceCredentialBodySchema,
@@ -7830,8 +7820,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7830
7820
  retention: {
7831
7821
  owner: "local-auth",
7832
7822
  reason: "daily reap removes revoked/expired rows older than 90 days"
7833
- },
7834
- adoptsFrom: DEVICE_CREDENTIALS_COLLECTION
7823
+ }
7835
7824
  },
7836
7825
  "auth-audit": {
7837
7826
  schema: AuthAuditBodySchema,
@@ -7846,8 +7835,7 @@ var _localAuthRecordKinds = require_dist.defineRecordKinds({
7846
7835
  retention: {
7847
7836
  ttlMs: 90 * DAY_MS,
7848
7837
  from: "at"
7849
- },
7850
- adoptsFrom: AUTH_AUDIT_COLLECTION
7838
+ }
7851
7839
  }
7852
7840
  });
7853
7841
  var localAuthRecordKinds = _localAuthRecordKinds;
@@ -12307,45 +12295,41 @@ var LocalAuthAddon = class extends require_dist.BaseAddon {
12307
12295
  const store = this.ctx.api?.settingsStore;
12308
12296
  const records = this.ctx.records;
12309
12297
  if (store && records) {
12310
- const useRecords = await require_phase6_declare_gate.resolvePhase6UseRecordsPathForHub(this.ctx, "local-auth", localAuthRecordKinds, LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS);
12311
- const authStores = useRecords ? localAuthRecordStoresOf(records) : null;
12298
+ await records.declare(localAuthRecordKinds);
12299
+ const authStores = localAuthRecordStoresOf(records);
12312
12300
  await records.declare(localAuthPreferencesRecordKinds);
12313
12301
  this.preferences = new UserPreferencesStore(records.kind(localAuthPreferencesRecordKinds["user-preferences"]));
12314
- const legacyStoreAccess = { getStore: () => store };
12315
- await declareAuthSchema(store, { ...useRecords ? { skipCollections: LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS } : {} });
12316
- this.userManager = authStores === null ? new UserManager(legacyStoreAccess, this.authManager) : new UserManager({
12302
+ await declareAuthSchema(store, { skipCollections: LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS });
12303
+ this.userManager = new UserManager({
12317
12304
  usersKind: authStores.users,
12318
12305
  legacyStore: store
12319
12306
  }, this.authManager);
12320
- this.apiKeyManager = authStores === null ? new ApiKeyManager(legacyStoreAccess) : new ApiKeyManager({
12307
+ this.apiKeyManager = new ApiKeyManager({
12321
12308
  apiKeysKind: authStores.apiKeys,
12322
12309
  legacyStore: store
12323
12310
  });
12324
- this.oauthSessionManager = authStores === null ? new OauthSessionManager(store) : new OauthSessionManager({
12311
+ this.oauthSessionManager = new OauthSessionManager({
12325
12312
  oauthSessionsKind: authStores.oauthSessions,
12326
12313
  legacyStore: store
12327
12314
  });
12328
- this.totpManager = authStores === null ? new TotpManager(store, {
12329
- secrets: forOwner === null ? null : forOwner("system"),
12330
- logger: this.ctx.logger
12331
- }) : new TotpManager({
12315
+ this.totpManager = new TotpManager({
12332
12316
  userTotpKind: authStores.userTotp,
12333
12317
  legacyStore: store
12334
12318
  }, {
12335
12319
  secrets: forOwner === null ? null : forOwner("system"),
12336
12320
  logger: this.ctx.logger
12337
12321
  });
12338
- this.externalIdentities = authStores === null ? new ExternalIdentityManager(store) : new ExternalIdentityManager({
12322
+ this.externalIdentities = new ExternalIdentityManager({
12339
12323
  identitiesKind: authStores.userExternalIdentities,
12340
12324
  legacyStore: store
12341
12325
  });
12342
- this.loginSessions = authStores === null ? new LoginSessionManager(store, { logger: this.ctx.logger }) : new LoginSessionManager({
12326
+ this.loginSessions = new LoginSessionManager({
12343
12327
  sessionsKind: authStores.loginSessions,
12344
12328
  cutoffsKind: authStores.loginSessionCutoffs,
12345
12329
  legacyStore: store
12346
12330
  }, { logger: this.ctx.logger });
12347
12331
  await this.loginSessions.load();
12348
- this.auditLog = authStores === null ? new AuthAuditLog(store, this.ctx.logger) : new AuthAuditLog({
12332
+ this.auditLog = new AuthAuditLog({
12349
12333
  authAuditKind: authStores.authAudit,
12350
12334
  legacyStore: store
12351
12335
  }, this.ctx.logger);
@@ -12365,7 +12349,7 @@ var LocalAuthAddon = class extends require_dist.BaseAddon {
12365
12349
  return user === null ? null : { username: user.username };
12366
12350
  },
12367
12351
  selfEnrollmentAllowed: async () => (await this.readDeviceCertificateSettings()).selfEnrollment === "allowed",
12368
- deviceCredentialsKind: authStores?.deviceCredentials ?? null,
12352
+ deviceCredentialsKind: authStores.deviceCredentials,
12369
12353
  logger: this.ctx.logger
12370
12354
  });
12371
12355
  await this.deviceCredentials.load();
@@ -1,10 +1,9 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $ as PreferenceDeviceIdSchema, D as DEVICE_ENROLLMENT_TTL_MS, Ea as userError, En as isCredentialTokenPayload, Et as authProviderCapability, Ki as defineRecordKinds, Mt as buildDeviceSignatureMessage, Nr as userManagementCapability, Q as PREFERENCES_MAX_VALUE_BYTES, _n as formatDeviceRevoker, a as ApiKeyRecordSchema, aa as makeSecretMarker, b as CredentialTokenClaimsSchema, dt as SsoBridgeClaimsSchema, en as deviceCredentialsCapability, et as PreferenceNamespaceSchema, g as CREDENTIAL_TOKEN_AUDIENCE, gt as TokenScopeSchema, jt as buildDeviceEnrollmentLink, k as DEVICE_NONCE_TTL_MS, lt as ScopedTokenSchema, na as isSecretMarker, ni as BaseAddon, tt as PreferenceValueSchema, vt as UserRecordSchema } from "../../dist-Dhux90yB.mjs";
2
+ import { $ as PreferenceDeviceIdSchema, Ca as userError, D as DEVICE_ENROLLMENT_TTL_MS, En as isCredentialTokenPayload, Et as authProviderCapability, Gi as defineRecordKinds, Mt as buildDeviceSignatureMessage, Nr as userManagementCapability, Q as PREFERENCES_MAX_VALUE_BYTES, _n as formatDeviceRevoker, a as ApiKeyRecordSchema, b as CredentialTokenClaimsSchema, dt as SsoBridgeClaimsSchema, en as deviceCredentialsCapability, et as PreferenceNamespaceSchema, g as CREDENTIAL_TOKEN_AUDIENCE, gt as TokenScopeSchema, ia as makeSecretMarker, jt as buildDeviceEnrollmentLink, k as DEVICE_NONCE_TTL_MS, lt as ScopedTokenSchema, ni as BaseAddon, ta as isSecretMarker, tt as PreferenceValueSchema, vt as UserRecordSchema } from "../../dist-Wy8cTxg6.mjs";
3
3
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
4
4
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
5
5
  import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
6
- import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-BB6nHAL5.mjs";
7
- import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-x9ZCbQJP.mjs";
6
+ import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-Bnkw8GyU.mjs";
8
7
  import { z } from "zod";
9
8
  import * as crypto$1 from "node:crypto";
10
9
  import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
@@ -7684,8 +7683,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7684
7683
  fields: ["username"],
7685
7684
  unique: true
7686
7685
  }],
7687
- retention: { none: "row goes only when an operator deletes the user; destructive declareCollection rebuild wipes all accounts" },
7688
- adoptsFrom: USERS_COLLECTION$1
7686
+ retention: { none: "row goes only when an operator deletes the user; destructive declareCollection rebuild wipes all accounts" }
7689
7687
  },
7690
7688
  "api-keys": {
7691
7689
  schema: ApiKeyBodySchema,
@@ -7697,8 +7695,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7697
7695
  name: "prefix",
7698
7696
  fields: ["tokenPrefix"]
7699
7697
  }],
7700
- retention: { none: "explicit revoke only" },
7701
- adoptsFrom: API_KEYS_COLLECTION
7698
+ retention: { none: "explicit revoke only" }
7702
7699
  },
7703
7700
  "scoped-tokens": {
7704
7701
  schema: ScopedTokenBodySchema,
@@ -7714,8 +7711,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7714
7711
  name: "user",
7715
7712
  fields: ["userId"]
7716
7713
  }],
7717
- retention: { none: "the operator drops the legacy rows by hand (D895)" },
7718
- adoptsFrom: SCOPED_TOKENS_COLLECTION
7714
+ retention: { none: "the operator drops the legacy rows by hand (D895)" }
7719
7715
  },
7720
7716
  "admin-tokens": {
7721
7717
  schema: AdminTokenBodySchema,
@@ -7731,8 +7727,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7731
7727
  name: "created_by",
7732
7728
  fields: ["createdBy"]
7733
7729
  }],
7734
- retention: { none: "the operator drops the legacy rows by hand (D895)" },
7735
- adoptsFrom: ADMIN_TOKENS_COLLECTION
7730
+ retention: { none: "the operator drops the legacy rows by hand (D895)" }
7736
7731
  },
7737
7732
  "login-sessions": {
7738
7733
  schema: LoginSessionBodySchema,
@@ -7750,8 +7745,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7750
7745
  retention: {
7751
7746
  owner: "local-auth",
7752
7747
  reason: "daily reap: expired >7d and revoked >30d"
7753
- },
7754
- adoptsFrom: LOGIN_SESSIONS_COLLECTION
7748
+ }
7755
7749
  },
7756
7750
  "login-session-cutoffs": {
7757
7751
  schema: LoginSessionCutoffBodySchema,
@@ -7759,8 +7753,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7759
7753
  writeTrigger: "revoke-all-sessions for a user (password change, delete, logout everywhere)",
7760
7754
  device: "none",
7761
7755
  at: "none",
7762
- retention: { none: "one row per user who ever had all sessions revoked" },
7763
- adoptsFrom: LOGIN_SESSION_CUTOFFS_COLLECTION
7756
+ retention: { none: "one row per user who ever had all sessions revoked" }
7764
7757
  },
7765
7758
  "oauth-sessions": {
7766
7759
  schema: OauthSessionBodySchema,
@@ -7775,8 +7768,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7775
7768
  retention: {
7776
7769
  owner: "local-auth",
7777
7770
  reason: "daily reap deletes revoked sessions older than 30 days; active rows never expire"
7778
- },
7779
- adoptsFrom: OAUTH_SESSIONS_COLLECTION
7771
+ }
7780
7772
  },
7781
7773
  "user-totp": {
7782
7774
  schema: UserTotpBodySchema,
@@ -7784,8 +7776,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7784
7776
  writeTrigger: "setup inserts seed (keychain); confirm sets confirmedAt; disable deletes row",
7785
7777
  device: "none",
7786
7778
  at: "none",
7787
- retention: { none: "disable or replace on re-setup; user delete does not cascade" },
7788
- adoptsFrom: USER_TOTP_COLLECTION
7779
+ retention: { none: "disable or replace on re-setup; user delete does not cascade" }
7789
7780
  },
7790
7781
  "user-external-identities": {
7791
7782
  schema: ExternalIdentityBodySchema,
@@ -7801,8 +7792,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7801
7792
  fields: ["provider", "subject"],
7802
7793
  unique: true
7803
7794
  }],
7804
- retention: { none: "unlink or deleteUser removes rows" },
7805
- adoptsFrom: USER_EXTERNAL_IDENTITIES_COLLECTION
7795
+ retention: { none: "unlink or deleteUser removes rows" }
7806
7796
  },
7807
7797
  "device-credentials": {
7808
7798
  schema: DeviceCredentialBodySchema,
@@ -7820,8 +7810,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7820
7810
  retention: {
7821
7811
  owner: "local-auth",
7822
7812
  reason: "daily reap removes revoked/expired rows older than 90 days"
7823
- },
7824
- adoptsFrom: DEVICE_CREDENTIALS_COLLECTION
7813
+ }
7825
7814
  },
7826
7815
  "auth-audit": {
7827
7816
  schema: AuthAuditBodySchema,
@@ -7836,8 +7825,7 @@ var _localAuthRecordKinds = defineRecordKinds({
7836
7825
  retention: {
7837
7826
  ttlMs: 90 * DAY_MS,
7838
7827
  from: "at"
7839
- },
7840
- adoptsFrom: AUTH_AUDIT_COLLECTION
7828
+ }
7841
7829
  }
7842
7830
  });
7843
7831
  var localAuthRecordKinds = _localAuthRecordKinds;
@@ -12296,45 +12284,41 @@ var LocalAuthAddon = class extends BaseAddon {
12296
12284
  const store = this.ctx.api?.settingsStore;
12297
12285
  const records = this.ctx.records;
12298
12286
  if (store && records) {
12299
- const useRecords = await resolvePhase6UseRecordsPathForHub(this.ctx, "local-auth", localAuthRecordKinds, LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS);
12300
- const authStores = useRecords ? localAuthRecordStoresOf(records) : null;
12287
+ await records.declare(localAuthRecordKinds);
12288
+ const authStores = localAuthRecordStoresOf(records);
12301
12289
  await records.declare(localAuthPreferencesRecordKinds);
12302
12290
  this.preferences = new UserPreferencesStore(records.kind(localAuthPreferencesRecordKinds["user-preferences"]));
12303
- const legacyStoreAccess = { getStore: () => store };
12304
- await declareAuthSchema(store, { ...useRecords ? { skipCollections: LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS } : {} });
12305
- this.userManager = authStores === null ? new UserManager(legacyStoreAccess, this.authManager) : new UserManager({
12291
+ await declareAuthSchema(store, { skipCollections: LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS });
12292
+ this.userManager = new UserManager({
12306
12293
  usersKind: authStores.users,
12307
12294
  legacyStore: store
12308
12295
  }, this.authManager);
12309
- this.apiKeyManager = authStores === null ? new ApiKeyManager(legacyStoreAccess) : new ApiKeyManager({
12296
+ this.apiKeyManager = new ApiKeyManager({
12310
12297
  apiKeysKind: authStores.apiKeys,
12311
12298
  legacyStore: store
12312
12299
  });
12313
- this.oauthSessionManager = authStores === null ? new OauthSessionManager(store) : new OauthSessionManager({
12300
+ this.oauthSessionManager = new OauthSessionManager({
12314
12301
  oauthSessionsKind: authStores.oauthSessions,
12315
12302
  legacyStore: store
12316
12303
  });
12317
- this.totpManager = authStores === null ? new TotpManager(store, {
12318
- secrets: forOwner === null ? null : forOwner("system"),
12319
- logger: this.ctx.logger
12320
- }) : new TotpManager({
12304
+ this.totpManager = new TotpManager({
12321
12305
  userTotpKind: authStores.userTotp,
12322
12306
  legacyStore: store
12323
12307
  }, {
12324
12308
  secrets: forOwner === null ? null : forOwner("system"),
12325
12309
  logger: this.ctx.logger
12326
12310
  });
12327
- this.externalIdentities = authStores === null ? new ExternalIdentityManager(store) : new ExternalIdentityManager({
12311
+ this.externalIdentities = new ExternalIdentityManager({
12328
12312
  identitiesKind: authStores.userExternalIdentities,
12329
12313
  legacyStore: store
12330
12314
  });
12331
- this.loginSessions = authStores === null ? new LoginSessionManager(store, { logger: this.ctx.logger }) : new LoginSessionManager({
12315
+ this.loginSessions = new LoginSessionManager({
12332
12316
  sessionsKind: authStores.loginSessions,
12333
12317
  cutoffsKind: authStores.loginSessionCutoffs,
12334
12318
  legacyStore: store
12335
12319
  }, { logger: this.ctx.logger });
12336
12320
  await this.loginSessions.load();
12337
- this.auditLog = authStores === null ? new AuthAuditLog(store, this.ctx.logger) : new AuthAuditLog({
12321
+ this.auditLog = new AuthAuditLog({
12338
12322
  authAuditKind: authStores.authAudit,
12339
12323
  legacyStore: store
12340
12324
  }, this.ctx.logger);
@@ -12354,7 +12338,7 @@ var LocalAuthAddon = class extends BaseAddon {
12354
12338
  return user === null ? null : { username: user.username };
12355
12339
  },
12356
12340
  selfEnrollmentAllowed: async () => (await this.readDeviceCertificateSettings()).selfEnrollment === "allowed",
12357
- deviceCredentialsKind: authStores?.deviceCredentials ?? null,
12341
+ deviceCredentialsKind: authStores.deviceCredentials,
12358
12342
  logger: this.ctx.logger
12359
12343
  });
12360
12344
  await this.deviceCredentials.load();
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-C89nqNnn.js");
4
- const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DB1Y9agt.js");
3
+ const require_dist = require("../../dist-Bn-RNanh.js");
4
+ const require_hub_mdns_ciao = require("../../hub-mdns-ciao-CTBTlia4.js");
5
5
  let zod = require("zod");
6
6
  let node_net = require("node:net");
7
7
  let node_os = require("node:os");
@@ -1,5 +1,5 @@
1
- import { $n as pickAppLinkHub, Cn as isAppLinkBase, Dn as isDefaultAppConnectionEndpoint, Fr as validateCustomAddress, H as HUB_MDNS_TXT_KEYS, Ln as localNetworkCapability, Lt as checkRoleAddress, Oa as EventCategory, V as HUB_MDNS_SERVICE_TYPE, Z as NetworkTunnelStartedDataSchema, cr as resolveAppConnections, fr as resolveHubAddressRoles, hr as resolveNotificationTapAddress, l as CAMSTACK_APP_LINK_ORIGIN, ni as BaseAddon, ti as errMsg, xr as shortHostname } from "../../dist-Dhux90yB.mjs";
2
- import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-B8olZqqd.mjs";
1
+ import { $n as pickAppLinkHub, Cn as isAppLinkBase, Dn as isDefaultAppConnectionEndpoint, Fr as validateCustomAddress, H as HUB_MDNS_TXT_KEYS, Ln as localNetworkCapability, Lt as checkRoleAddress, Ta as EventCategory, V as HUB_MDNS_SERVICE_TYPE, Z as NetworkTunnelStartedDataSchema, cr as resolveAppConnections, fr as resolveHubAddressRoles, hr as resolveNotificationTapAddress, l as CAMSTACK_APP_LINK_ORIGIN, ni as BaseAddon, ti as errMsg, xr as shortHostname } from "../../dist-Wy8cTxg6.mjs";
2
+ import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-CJu0nhla.mjs";
3
3
  import { z } from "zod";
4
4
  import { isIP } from "node:net";
5
5
  import * as os$1 from "node:os";