@camstack/system 1.2.454 → 1.2.456

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/{agent-https-oXsR24R2.mjs → agent-https-fm4AR8XL.mjs} +32 -5
  2. package/dist/{agent-https-B7IjRRzT.js → agent-https-yjxdfJDA.js} +37 -4
  3. package/dist/auth/auth-audit-log.d.ts +1 -1
  4. package/dist/auth/auth-manager.d.ts +16 -1
  5. package/dist/auth/legacy-token-tables.d.ts +16 -0
  6. package/dist/auth/user-management-internal.d.ts +9 -28
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  10. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  11. package/dist/builtins/alerts/alerts.addon.js +2 -2
  12. package/dist/builtins/alerts/alerts.addon.mjs +2 -2
  13. package/dist/builtins/autotrack/index.js +1 -1
  14. package/dist/builtins/autotrack/index.mjs +1 -1
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  16. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  17. package/dist/builtins/calendars/calendars.addon.js +1 -1
  18. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  19. package/dist/builtins/camera-grid/index.js +1 -1
  20. package/dist/builtins/camera-grid/index.mjs +1 -1
  21. package/dist/builtins/composer/composer.addon.js +2 -2
  22. package/dist/builtins/composer/composer.addon.mjs +2 -2
  23. package/dist/builtins/console-logging/index.js +1 -1
  24. package/dist/builtins/console-logging/index.mjs +1 -1
  25. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  26. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  27. package/dist/builtins/device-history/device-history.addon.js +1 -1
  28. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  29. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  30. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  31. package/dist/builtins/hub-forwarder/index.js +1 -1
  32. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  33. package/dist/builtins/keychain/index.js +4 -4
  34. package/dist/builtins/keychain/index.mjs +4 -4
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  37. package/dist/builtins/local-auth/auth-schema.d.ts +4 -7
  38. package/dist/builtins/local-auth/local-auth.addon.d.ts +7 -8
  39. package/dist/builtins/local-auth/local-auth.addon.js +1094 -1327
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +1093 -1324
  41. package/dist/builtins/local-auth/preferences-record-kinds.d.ts +27 -0
  42. package/dist/builtins/local-auth/record-kinds.d.ts +4 -3
  43. package/dist/builtins/local-auth/user-preferences-store.d.ts +56 -0
  44. package/dist/builtins/local-network/local-network.addon.d.ts +8 -0
  45. package/dist/builtins/local-network/local-network.addon.js +30 -5
  46. package/dist/builtins/local-network/local-network.addon.mjs +30 -5
  47. package/dist/builtins/loki-logging/index.js +1 -1
  48. package/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  51. package/dist/builtins/platform-probe/index.js +1 -1
  52. package/dist/builtins/platform-probe/index.mjs +1 -1
  53. package/dist/builtins/record-entries/index.js +1 -1
  54. package/dist/builtins/record-entries/index.mjs +1 -1
  55. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/dist/builtins/snapshot/index.js +1 -1
  58. package/dist/builtins/snapshot/index.mjs +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  61. package/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +1 -0
  64. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +13 -0
  65. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +52 -6
  66. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +52 -6
  67. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  68. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  69. package/dist/builtins/system-config/system-config.addon.js +3 -3
  70. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  71. package/dist/builtins/winston-logging/index.js +1 -1
  72. package/dist/builtins/winston-logging/index.mjs +1 -1
  73. package/dist/{composition-sources-bt6IQDLu.mjs → composition-sources-Ds0Vr6eD.mjs} +1 -1
  74. package/dist/{composition-sources-Cukc78eu.js → composition-sources-gB4coDJR.js} +1 -1
  75. package/dist/{constants-DBGG6Zu5.js → constants-CavyKfHZ.js} +1 -1
  76. package/dist/{constants-DQcVrhVI.mjs → constants-i5oD_gLB.mjs} +1 -1
  77. package/dist/{device-ca-B3hUVfYk.js → device-ca-bpoEr0zG.js} +1 -1
  78. package/dist/{device-ca-Utfvsx5x.mjs → device-ca-qz1Pmeu1.mjs} +1 -1
  79. package/dist/{dist-7ZciHCIp.mjs → dist-BSF_C8W2.mjs} +446 -300
  80. package/dist/{dist-Bi4Ioxop.js → dist-BpqA2CT0.js} +487 -299
  81. package/dist/file-host-worker.js +1 -1
  82. package/dist/file-host-worker.mjs +1 -1
  83. package/dist/{hub-mdns-ciao-BRs3DUT-.mjs → hub-mdns-ciao-CHaGDzyz.mjs} +20 -13
  84. package/dist/{hub-mdns-ciao-2FzLWfbD.js → hub-mdns-ciao-CZlZRxxA.js} +20 -13
  85. package/dist/index.d.ts +2 -4
  86. package/dist/index.js +17 -11
  87. package/dist/index.mjs +17 -9
  88. package/dist/{phase6-declare-gate-D-2LMw9o.mjs → phase6-declare-gate-B4yfsf2n.mjs} +1 -1
  89. package/dist/{phase6-declare-gate-DwYAep7y.js → phase6-declare-gate-n-IZRklX.js} +1 -1
  90. package/dist/{restore-archive-C0ymYQk7.js → restore-archive-B4QG7XmX.js} +1 -1
  91. package/dist/{restore-archive-UVZv_hmr.mjs → restore-archive-BGUM4FKf.mjs} +1 -1
  92. package/dist/tls/cert-issue.d.ts +16 -1
  93. package/dist/tls/cert-manager.d.ts +6 -0
  94. package/dist/tls/index.d.ts +1 -1
  95. package/dist/{wal-maintenance-Df89xxrK.mjs → wal-maintenance-AerF4XE6.mjs} +0 -0
  96. package/dist/{wal-maintenance-Bo_lo3Dh.js → wal-maintenance-CNEs_I94.js} +0 -0
  97. package/package.json +1 -1
  98. package/dist/auth/admin-token-manager.d.ts +0 -51
  99. package/dist/auth/scoped-token-manager.d.ts +0 -25
@@ -1,6 +1,6 @@
1
- import { Ii as defineRecordKinds } from "./dist-7ZciHCIp.mjs";
1
+ import { Ui as defineRecordKinds } from "./dist-BSF_C8W2.mjs";
2
2
  import { S as backdatedNotBefore, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-DK__ETIe.mjs";
3
- import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-DQcVrhVI.mjs";
3
+ import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-i5oD_gLB.mjs";
4
4
  import { z } from "zod";
5
5
  import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
@@ -1200,6 +1200,31 @@ function collectCertIdentity(options) {
1200
1200
  cryptoProvider.set(webcrypto);
1201
1201
  /** Subject of the local root. Distinct from the leaf's CN by construction. */
1202
1202
  var CA_COMMON_NAME = "CamStack Local CA";
1203
+ /** Between {@link CA_COMMON_NAME} and the hub's name in a new root's subject. */
1204
+ var CA_HUB_NAME_SEPARATOR = " — ";
1205
+ /** X.520 `ub-common-name`: the most characters a CN may carry. */
1206
+ var X509_COMMON_NAME_MAX_LENGTH = 64;
1207
+ /** C0 controls, DEL and the C1 range. */
1208
+ function isControlCodePoint(code) {
1209
+ return code <= 31 || code >= 127 && code <= 159;
1210
+ }
1211
+ /**
1212
+ * The subject CN of a NEW local root: `CamStack Local CA — <hub name>`, so two hubs'
1213
+ * roots installed on one phone can be told apart in its settings. The name is
1214
+ * sanitised for a CN (controls removed, whitespace collapsed) and cut so the whole
1215
+ * CN stays within 64 characters. An absent or unusable name, or one that is just
1216
+ * the product's own name, yields the plain {@link CA_COMMON_NAME}.
1217
+ *
1218
+ * Only a root being CREATED is named: an existing root is never reissued to rename
1219
+ * it, since every device that trusts it would have to install it again.
1220
+ */
1221
+ function localCaCommonName(hubName) {
1222
+ if (hubName === void 0) return CA_COMMON_NAME;
1223
+ const cleaned = [...hubName].map((char) => isControlCodePoint(char.codePointAt(0) ?? 0) ? " " : char).join("").replace(/\s+/gu, " ").trim();
1224
+ if (cleaned === "" || cleaned.toLowerCase() === "camstack") return CA_COMMON_NAME;
1225
+ const room = X509_COMMON_NAME_MAX_LENGTH - 17 - 3;
1226
+ return `${CA_COMMON_NAME}${CA_HUB_NAME_SEPARATOR}${[...cleaned].slice(0, room).join("").trimEnd()}`;
1227
+ }
1203
1228
  var MS_PER_DAY = 864e5;
1204
1229
  /**
1205
1230
  * Expiry of a served leaf. Browsers cap the TOTAL span (notBefore to notAfter) at 397 days, so
@@ -1261,8 +1286,10 @@ function subjectAltNames(identity) {
1261
1286
  * It carries a CRITICAL `nameConstraints` extension (D873): private address
1262
1287
  * ranges and local-only DNS names, plus `hostnames` (the hub's own single-label
1263
1288
  * names at creation). A leaked key therefore cannot vouch for a public site.
1289
+ *
1290
+ * `commonName` is the subject CN, from {@link localCaCommonName}.
1264
1291
  */
1265
- async function generateCa(now, hostnames = []) {
1292
+ async function generateCa(now, hostnames = [], commonName = CA_COMMON_NAME) {
1266
1293
  const keys = await webcrypto.subtle.generateKey(SIGNING_ALGORITHM, true, ["sign", "verify"]);
1267
1294
  const extensions = [
1268
1295
  new BasicConstraintsExtension(true, 0, true),
@@ -1272,7 +1299,7 @@ async function generateCa(now, hostnames = []) {
1272
1299
  ];
1273
1300
  const cert = await X509CertificateGenerator.createSelfSigned({
1274
1301
  serialNumber: freshSerial(),
1275
- name: `CN=${CA_COMMON_NAME}`,
1302
+ name: [{ CN: [commonName] }],
1276
1303
  notBefore: backdatedNotBefore(now),
1277
1304
  notAfter: new Date(now.getTime() + CA_VALIDITY_DAYS * MS_PER_DAY),
1278
1305
  keys,
@@ -1627,4 +1654,4 @@ function pemDigest(pem) {
1627
1654
  return createHash("sha256").update(pem).digest("hex").slice(0, 16);
1628
1655
  }
1629
1656
  //#endregion
1630
- export { generateMeshKeyPair as $, isConstrainedCa as A, systemConfigRecordKinds as B, MAX_LEAF_VALIDITY_DAYS as C, PERMITTED_DNS_SUFFIXES as D, reasonRequiresNewCa as E, AGENT_HTTPS_NAMES_COLLECTION as F, describeMeshLeaf as G, MESH_NODE_CERTIFICATES_COLUMNS as H, AGENT_HTTPS_NAMES_COLUMNS as I, caFingerprint as J, getProcessMeshCertificateRegistry as K, AgentHttpsNames as L, permitsIdentity as M, permitsName as N, PERMITTED_IP_RANGES as O, readNameConstraints as P, generateMeshCa as Q, getProcessAgentHttpsNames as R, LEAF_RENEWAL_WINDOW_DAYS as S, evaluateExistingCert as T, MeshCertificateRegistry as U, MESH_NODE_CERTIFICATES_COLLECTION as V, RENEWAL_ABANDONED as W, createMeshCsrPem as X, caFingerprintCompact as Y, exportMeshPrivateKeyPem as Z, issueLeaf as _, collectAgentNames as a, systemHostFacts as b, installAgentHttps as c, issueAgentHttpsLeaf as d, isValidAgentNodeId as et, loadAgentHttps as f, generateCa as g, CA_COMMON_NAME as h, certificateNames as i, subjectCn as it, isLocalOnlyHostname as j, buildNameConstraintSet as k, isContainerBridgeAddress as l, pinnedHttpsCaFingerprint as m, acceptAgentSans as n, issueMeshLeafFromCsr as nt, createAgentHttpsRequest as o, pemDigest as p, setProcessMeshCertificateRegistry as q, agentHttpsPaths as r, loadMeshCa as rt, describeHttpsLeaf as s, AgentHttpsInstallError as t, issueMeshLeafForNode as tt, isPrivateAddress as u, loadCa as v, SERVER_AUTH_OID as w, CA_VALIDITY_DAYS as x, collectCertIdentity as y, setProcessAgentHttpsNames as z };
1657
+ export { generateMeshCa as $, buildNameConstraintSet as A, setProcessAgentHttpsNames as B, LEAF_RENEWAL_WINDOW_DAYS as C, reasonRequiresNewCa as D, evaluateExistingCert as E, readNameConstraints as F, RENEWAL_ABANDONED as G, MESH_NODE_CERTIFICATES_COLLECTION as H, AGENT_HTTPS_NAMES_COLLECTION as I, setProcessMeshCertificateRegistry as J, describeMeshLeaf as K, AGENT_HTTPS_NAMES_COLUMNS as L, isLocalOnlyHostname as M, permitsIdentity as N, PERMITTED_DNS_SUFFIXES as O, permitsName as P, exportMeshPrivateKeyPem as Q, AgentHttpsNames as R, CA_VALIDITY_DAYS as S, SERVER_AUTH_OID as T, MESH_NODE_CERTIFICATES_COLUMNS as U, systemConfigRecordKinds as V, MeshCertificateRegistry as W, caFingerprintCompact as X, caFingerprint as Y, createMeshCsrPem as Z, issueLeaf as _, collectAgentNames as a, subjectCn as at, collectCertIdentity as b, installAgentHttps as c, issueAgentHttpsLeaf as d, generateMeshKeyPair as et, loadAgentHttps as f, generateCa as g, CA_COMMON_NAME as h, certificateNames as i, loadMeshCa as it, isConstrainedCa as j, PERMITTED_IP_RANGES as k, isContainerBridgeAddress as l, pinnedHttpsCaFingerprint as m, acceptAgentSans as n, issueMeshLeafForNode as nt, createAgentHttpsRequest as o, pemDigest as p, getProcessMeshCertificateRegistry as q, agentHttpsPaths as r, issueMeshLeafFromCsr as rt, describeHttpsLeaf as s, AgentHttpsInstallError as t, isValidAgentNodeId as tt, isPrivateAddress as u, loadCa as v, MAX_LEAF_VALIDITY_DAYS as w, systemHostFacts as x, localCaCommonName as y, getProcessAgentHttpsNames as z };
@@ -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-BpqA2CT0.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.js");
4
- const require_constants = require("./constants-DBGG6Zu5.js");
4
+ const require_constants = require("./constants-CavyKfHZ.js");
5
5
  let zod = require("zod");
6
6
  let node_crypto = require("node:crypto");
7
7
  let _camstack_types_node = require("@camstack/types/node");
@@ -1202,6 +1202,31 @@ function collectCertIdentity(options) {
1202
1202
  require_x509_es.cryptoProvider.set(node_crypto.webcrypto);
1203
1203
  /** Subject of the local root. Distinct from the leaf's CN by construction. */
1204
1204
  var CA_COMMON_NAME = "CamStack Local CA";
1205
+ /** Between {@link CA_COMMON_NAME} and the hub's name in a new root's subject. */
1206
+ var CA_HUB_NAME_SEPARATOR = " — ";
1207
+ /** X.520 `ub-common-name`: the most characters a CN may carry. */
1208
+ var X509_COMMON_NAME_MAX_LENGTH = 64;
1209
+ /** C0 controls, DEL and the C1 range. */
1210
+ function isControlCodePoint(code) {
1211
+ return code <= 31 || code >= 127 && code <= 159;
1212
+ }
1213
+ /**
1214
+ * The subject CN of a NEW local root: `CamStack Local CA — <hub name>`, so two hubs'
1215
+ * roots installed on one phone can be told apart in its settings. The name is
1216
+ * sanitised for a CN (controls removed, whitespace collapsed) and cut so the whole
1217
+ * CN stays within 64 characters. An absent or unusable name, or one that is just
1218
+ * the product's own name, yields the plain {@link CA_COMMON_NAME}.
1219
+ *
1220
+ * Only a root being CREATED is named: an existing root is never reissued to rename
1221
+ * it, since every device that trusts it would have to install it again.
1222
+ */
1223
+ function localCaCommonName(hubName) {
1224
+ if (hubName === void 0) return CA_COMMON_NAME;
1225
+ const cleaned = [...hubName].map((char) => isControlCodePoint(char.codePointAt(0) ?? 0) ? " " : char).join("").replace(/\s+/gu, " ").trim();
1226
+ if (cleaned === "" || cleaned.toLowerCase() === "camstack") return CA_COMMON_NAME;
1227
+ const room = X509_COMMON_NAME_MAX_LENGTH - 17 - 3;
1228
+ return `${CA_COMMON_NAME}${CA_HUB_NAME_SEPARATOR}${[...cleaned].slice(0, room).join("").trimEnd()}`;
1229
+ }
1205
1230
  var MS_PER_DAY = 864e5;
1206
1231
  /**
1207
1232
  * Expiry of a served leaf. Browsers cap the TOTAL span (notBefore to notAfter) at 397 days, so
@@ -1263,8 +1288,10 @@ function subjectAltNames(identity) {
1263
1288
  * It carries a CRITICAL `nameConstraints` extension (D873): private address
1264
1289
  * ranges and local-only DNS names, plus `hostnames` (the hub's own single-label
1265
1290
  * names at creation). A leaked key therefore cannot vouch for a public site.
1291
+ *
1292
+ * `commonName` is the subject CN, from {@link localCaCommonName}.
1266
1293
  */
1267
- async function generateCa(now, hostnames = []) {
1294
+ async function generateCa(now, hostnames = [], commonName = CA_COMMON_NAME) {
1268
1295
  const keys = await node_crypto.webcrypto.subtle.generateKey(SIGNING_ALGORITHM, true, ["sign", "verify"]);
1269
1296
  const extensions = [
1270
1297
  new require_x509_es.BasicConstraintsExtension(true, 0, true),
@@ -1274,7 +1301,7 @@ async function generateCa(now, hostnames = []) {
1274
1301
  ];
1275
1302
  const cert = await require_x509_es.X509CertificateGenerator.createSelfSigned({
1276
1303
  serialNumber: freshSerial(),
1277
- name: `CN=${CA_COMMON_NAME}`,
1304
+ name: [{ CN: [commonName] }],
1278
1305
  notBefore: require_x509_es.backdatedNotBefore(now),
1279
1306
  notAfter: new Date(now.getTime() + CA_VALIDITY_DAYS * MS_PER_DAY),
1280
1307
  keys,
@@ -1911,6 +1938,12 @@ Object.defineProperty(exports, "loadMeshCa", {
1911
1938
  return loadMeshCa;
1912
1939
  }
1913
1940
  });
1941
+ Object.defineProperty(exports, "localCaCommonName", {
1942
+ enumerable: true,
1943
+ get: function() {
1944
+ return localCaCommonName;
1945
+ }
1946
+ });
1914
1947
  Object.defineProperty(exports, "pemDigest", {
1915
1948
  enumerable: true,
1916
1949
  get: function() {
@@ -8,7 +8,7 @@ import type { AuthAuditBody } from "../builtins/local-auth/record-kinds.js";
8
8
  */
9
9
  export declare const AUTH_AUDIT_COLLECTION = "auth_audit";
10
10
  export declare const AUTH_AUDIT_COLUMNS: readonly CollectionColumn[];
11
- export declare const AUTH_AUDIT_ACTIONS: readonly ["second-factor-skipped", "admin-token-created", "admin-token-used", "admin-token-revoked", "credentials-revoked", "agent-addon-update", "agent-addon-update-refused", "device-credential-enrolled", "device-credential-revoked", "device-credential-login", "device-credential-login-refused"];
11
+ export declare const AUTH_AUDIT_ACTIONS: readonly ["second-factor-skipped", "admin-token-created", "admin-token-used", "admin-token-revoked", "credentials-revoked", "agent-addon-update", "agent-addon-update-refused", "device-credential-enrolled", "device-credential-revoked", "device-credential-login", "device-credential-login-refused", "token-minted", "token-revoked"];
12
12
  export type AuthAuditAction = (typeof AUTH_AUDIT_ACTIONS)[number];
13
13
  export interface AuthAuditEvent {
14
14
  readonly action: AuthAuditAction;
@@ -1,4 +1,4 @@
1
- import type { IScopedLogger, TokenPayload } from "@camstack/types";
1
+ import type { CredentialTokenClaims, IScopedLogger, TokenPayload } from "@camstack/types";
2
2
  import { SsoBridgeClaimsSchema } from "@camstack/types";
3
3
  import type { z } from "zod";
4
4
  import { type JwtSigningKeySource } from "./jwt-signing-key.js";
@@ -53,7 +53,22 @@ export declare class AuthManager {
53
53
  * already had once.
54
54
  */
55
55
  private readConfiguredExpiry;
56
+ /**
57
+ * Sign a unified token (D892). No `exp`: the token's row — read by `jti` on
58
+ * every verify for revocation — holds its one expiry. The claims are parsed
59
+ * before signing, so nothing outside the schema is ever signed.
60
+ */
61
+ signCredentialToken(claims: CredentialTokenClaims): string;
62
+ /**
63
+ * Verify a session-family JWT: a login session, an account link, a bridge or
64
+ * challenge token. A MINTED token is refused here even though it carries a
65
+ * valid signature (D895): every surface that calls this wants a person's
66
+ * session, and a share link or a script's token must never pass for one.
67
+ * Minted tokens verify only through {@link verifyCredentialToken}.
68
+ */
56
69
  verifyToken(token: string): TokenPayload;
70
+ /** Verify a minted token (`auth.mintToken`): its signature AND its audience. Throws when invalid. */
71
+ verifyCredentialToken(token: string): CredentialTokenClaims;
57
72
  hashPassword(password: string): Promise<string>;
58
73
  comparePassword(password: string, hash: string): Promise<boolean>;
59
74
  /**
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The pre-D892 admin-token table — its LAYOUT only (D895).
3
+ *
4
+ * Nothing mints, reads or validates an admin token of the old format any more:
5
+ * an admin token is a `core-auth` `credential-tokens` row whose scopes hold
6
+ * `'*'`. The table stays declared so the storage layout is unchanged; its rows
7
+ * stay on disk until the operator drops them by hand.
8
+ */
9
+ import type { CollectionColumn } from "@camstack/types";
10
+ /**
11
+ * @durable class=config owner=local-auth
12
+ * write="none since D895 — the pre-D892 rows are kept on disk, read by nothing"
13
+ * retention="the operator drops the table by hand"
14
+ */
15
+ export declare const ADMIN_TOKENS_COLLECTION = "admin_tokens";
16
+ export declare const ADMIN_TOKENS_COLUMNS: readonly CollectionColumn[];
@@ -13,10 +13,10 @@
13
13
  * construction: a remote proxy of the provider simply has no such key, and
14
14
  * {@link getUserManagementInternal} answers `null` (the caller fails closed).
15
15
  */
16
- import type { AdminTokenRecord } from "./admin-token-manager.js";
17
16
  import type { AuthAuditEvent, AuthAuditRecord } from "./auth-audit-log.js";
18
17
  import type { DeviceCredentialManager } from "./device-credential-manager.js";
19
18
  import type { LoginSessionManager } from "./login-session-manager.js";
19
+ import type { UserPreferencesStore } from "../builtins/local-auth/user-preferences-store.js";
20
20
  /** Process-global, so every bundled copy of this module agrees on the key. */
21
21
  export declare const USER_MANAGEMENT_INTERNAL: unique symbol;
22
22
  export interface LinkExternalIdentityInput {
@@ -56,13 +56,6 @@ export interface UserManagementInternal {
56
56
  readonly sessions: LoginSessionsInternal;
57
57
  /** Change a password and end the user's other sessions (and pre-session tokens). */
58
58
  setPassword(input: SetPasswordInput): Promise<void>;
59
- /** Admin tokens (`csa_`) — the hub router gates creation (admin + re-auth). */
60
- readonly adminTokens: AdminTokensInternal;
61
- /**
62
- * Scoped tokens (`cst_`) — hub bulk revoke (`auth.revokeCredentials`).
63
- * `revoke` deletes the row; `false` when the id was already gone.
64
- */
65
- readonly scopedTokens: ScopedTokensInternal;
66
59
  /**
67
60
  * OAuth account-link sessions — hub bulk revoke. Active → mark revoked;
68
61
  * already revoked → delete the row (so "Remove revoked" clears the list).
@@ -72,28 +65,16 @@ export interface UserManagementInternal {
72
65
  readonly audit: AuthAuditInternal;
73
66
  /** Device certificates: enrollment legs, challenge, proof, renewal, liveness check. */
74
67
  readonly deviceCredentials: DeviceCredentialsInternal;
75
- }
76
- export interface ScopedTokensInternal {
77
- revoke(id: string): Promise<boolean>;
78
- }
79
- export interface OauthSessionsInternal {
80
- revoke(id: string): Promise<boolean>;
81
- }
82
- export interface AdminTokensInternal {
83
- create(input: {
84
- readonly createdBy: string;
85
- readonly name: string;
86
- readonly expiresAt: number;
87
- }): Promise<{
88
- readonly token: string;
89
- readonly record: AdminTokenRecord;
90
- }>;
91
68
  /**
92
- * The live token behind `token` — `null` when unknown, revoked, expired, or
93
- * when its creator no longer exists or is no longer an admin.
69
+ * Per-user account preferences (D894). Every method takes the OWNER's id
70
+ * first; the hub's `preferences.*` router stamps it from the principal.
71
+ * Absent on a provider that keeps none.
94
72
  */
95
- validate(token: string): Promise<AdminTokenRecord | null>;
96
- list(): Promise<readonly AdminTokenRecord[]>;
73
+ readonly preferences?: UserPreferencesInternal;
74
+ }
75
+ /** The account-preferences store, as the hub router uses it. */
76
+ export type UserPreferencesInternal = Pick<UserPreferencesStore, "get" | "put" | "delete" | "changedSince">;
77
+ export interface OauthSessionsInternal {
97
78
  revoke(id: string): Promise<boolean>;
98
79
  }
99
80
  export interface AuthAuditInternal {
@@ -3,7 +3,7 @@ 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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Gr as errMsg, Kr as BaseAddon, ut as addonPagesCapability, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Qr as errMsg, Ta as EventCategory, gt as addonPagesCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ 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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Gr as errMsg, Kr as BaseAddon, ft as addonWidgetsCapability, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Qr as errMsg, Ta as EventCategory, vt as addonWidgetsCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_phase6_declare_gate = require("../../phase6-declare-gate-DwYAep7y.js");
8
+ const require_phase6_declare_gate = require("../../phase6-declare-gate-n-IZRklX.js");
9
9
  //#region src/builtins/alerts/alert-episode-policy.ts
10
10
  /**
11
11
  * When does an alert open a new EPISODE, and which edge of it is announced?
@@ -1,6 +1,6 @@
1
- import { Gr as errMsg, Ii as defineRecordKinds, Kr as BaseAddon, Mi as createEvent, fn as isAlertEpisodeOpen, ht as alertsCapability, i as AlertSchema, mt as alertEpisodePayload, pn as isAlertEpisodeSeverity, pt as alertEpisodeId, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Qr as errMsg, Ta as EventCategory, Ui as defineRecordKinds, bt as alertEpisodePayload, i as AlertSchema, vn as isAlertEpisodeOpen, xt as alertsCapability, yn as isAlertEpisodeSeverity, yt as alertEpisodeId, zi as createEvent } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-D-2LMw9o.mjs";
3
+ import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-B4yfsf2n.mjs";
4
4
  //#region src/builtins/alerts/alert-episode-policy.ts
5
5
  /**
6
6
  * When does an alert open a new EPISODE, and which edge of it is announced?
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  //#region src/builtins/autotrack/autotrack-config.ts
8
8
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
9
9
  deadZoneFraction: .5,
@@ -1,4 +1,4 @@
1
- import { Gr as errMsg, Kr as BaseAddon, P as FIRST_LEVEL_MACRO_CLASSES, Ui as isEvent, qn as ptzAutotrackCapability, va as EventCategory, yt as bareAddonId } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, I as FIRST_LEVEL_MACRO_CLASSES, Qr as errMsg, Ta as EventCategory, Tt as bareAddonId, Xi as isEvent, er as ptzAutotrackCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -3,9 +3,9 @@ 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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-C0ymYQk7.js");
8
+ const require_restore_archive = require("../../restore-archive-B4QG7XmX.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  let node_fs_promises = require("node:fs/promises");
11
11
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,6 +1,6 @@
1
- import { Kr as BaseAddon, Nn as mayWriteToLocation, Zi as nodePin, pa as toNodeId, va as EventCategory, vr as storageOccupancyCapability, vt as backupCapability } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Bn as mayWriteToLocation, Ta as EventCategory, Tr as storageOccupancyCapability, ba as toNodeId, ia as nodePin, wt as backupCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-UVZv_hmr.mjs";
3
+ import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-BGUM4FKf.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fsp from "node:fs/promises";
6
6
  import * as path$1 from "node:path";
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/calendars/calendar-color.ts
@@ -1,4 +1,4 @@
1
- import { Ii as defineRecordKinds, Kr as BaseAddon, Tt as calendarsCapability, g as CalendarPreferencesSchema } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Ui as defineRecordKinds, _ as CalendarPreferencesSchema, jt as calendarsCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/calendars/calendar-color.ts
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  let zod = require("zod");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Bt as declarationOwnerNodeId, Et as cameraGridLayoutCapability, Gr as errMsg, Hr as DeviceFeature, Kr as BaseAddon, Ln as motionCapability, Mi as createEvent, Pn as memoizePinnedFfmpeg, Vi as hydrateSchema, Wr as DeviceType, br as streamCatalogCapability, j as DeclaredDevices, jr as buildFfmpegArgs, o as BaseDevice, pr as snapshotCapability, q as MOTION_CLOSE_AFTER_MS, va as EventCategory, w as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Dr as streamCatalogCapability, E as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ji as hydrateSchema, Kt as declarationOwnerNodeId, Mt as cameraGridLayoutCapability, N as DeclaredDevices, Qr as errMsg, Rr as buildFfmpegArgs, Ta as EventCategory, Vn as memoizePinnedFfmpeg, Wn as motionCapability, Y as MOTION_CLOSE_AFTER_MS, Yr as DeviceFeature, Zr as DeviceType, br as snapshotCapability, o as BaseDevice, zi as createEvent } from "../../dist-BSF_C8W2.mjs";
2
2
  import { z } from "zod";
3
3
  import { FfmpegProcess } from "@camstack/types/node";
4
4
  import { join } from "node:path";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Bi4Ioxop.js");
7
- const require_composition_sources = require("../../composition-sources-Cukc78eu.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
+ const require_composition_sources = require("../../composition-sources-gB4coDJR.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/shared/device-state-changed.ts
10
10
  /** Structural narrowing helper for untrusted bus payloads. */
@@ -1,5 +1,5 @@
1
- import { Ar as COMPOSER_ADDON_ID, At as compositionFieldKey, Br as disarmRoseMemory, Fr as compositionFeatureEnabled, Gr as errMsg, Ir as compositionItemFieldPath, Kr as BaseAddon, Lr as compositionSliceKey, Mi as createEvent, Mr as cloneStatefulExpressionMemory, Nr as composedDeviceRef, Pr as composedDeviceStableId, Rr as compositionSourceKey, Vr as toExpressionValue, Wn as planComposition, Wr as DeviceType, f as COMPOSED_ITEM_FIXED_FIELDS, in as expressionContainsBuiltinCall, j as DeclaredDevices, kt as composerCapability, o as BaseDevice, r as ALL_CAPABILITY_DEFINITIONS, tn as evaluateCompositionField, va as EventCategory, xt as buildCapabilityLookup, zr as createStatefulExpressionMemory } from "../../dist-7ZciHCIp.mjs";
2
- import { n as normalizedNativeOwner } from "../../composition-sources-bt6IQDLu.mjs";
1
+ import { $r as BaseAddon, Br as composedDeviceRef, Dt as buildCapabilityLookup, Ft as composerCapability, Gr as compositionSourceKey, Hr as compositionFeatureEnabled, It as compositionFieldKey, Jr as toExpressionValue, Kr as createStatefulExpressionMemory, Lr as COMPOSER_ADDON_ID, N as DeclaredDevices, Qr as errMsg, Ta as EventCategory, Ur as compositionItemFieldPath, Vr as composedDeviceStableId, Wr as compositionSliceKey, Zn as planComposition, Zr as DeviceType, f as COMPOSED_ITEM_FIXED_FIELDS, o as BaseDevice, qr as disarmRoseMemory, r as ALL_CAPABILITY_DEFINITIONS, sn as evaluateCompositionField, un as expressionContainsBuiltinCall, zi as createEvent, zr as cloneStatefulExpressionMemory } from "../../dist-BSF_C8W2.mjs";
2
+ import { n as normalizedNativeOwner } from "../../composition-sources-Ds0Vr6eD.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/shared/device-state-changed.ts
5
5
  /** Structural narrowing helper for untrusted bus payloads. */
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { Kr as BaseAddon, kn as logDestinationCapability } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, In as logDestinationCapability } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {
@@ -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-BpqA2CT0.js");
4
4
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
5
- const require_composition_sources = require("../../composition-sources-Cukc78eu.js");
5
+ const require_composition_sources = require("../../composition-sources-gB4coDJR.js");
6
6
  const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
7
7
  const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
8
8
  let zod = require("zod");
@@ -1,6 +1,6 @@
1
- import { Ai as collectSecretMarkerRefs, Ft as coreBlockSourceKind, Gr as errMsg, Ii as defineRecordKinds, It as coreBlocksCapability, Ji as isSecretRefOwnedBy, Ki as isSecretMarker, Kr as BaseAddon, Mt as coreBlockAddonId, Nr as composedDeviceRef, Nt as coreBlockComposition, Pt as coreBlockIdFromAddonId, Rn as normalizeCoreBlockWrite, Rr as compositionSourceKey, Vi as hydrateSchema, Wn as planComposition, Wt as describeComposableCaps, Zn as replacedFieldKeys, ca as resolveSecretMarkers, da as secretTreeFromSchema, er as resolveCoreBlockEntry, h as CORE_BLOCK_ADDON_PREFIX, ha as transformSecretWrite, j as DeclaredDevices, jt as compositionSourceRefs, m as CORE_BLOCKS_ADDON_ID, p as COMPOSER_RUNNER_ID, r as ALL_CAPABILITY_DEFINITIONS, tr as resolveCoreBlockFiles, v as CoreBlockSchema, wr as validateComposition, xt as buildCapabilityLookup } from "../../dist-7ZciHCIp.mjs";
1
+ import { $i as isSecretMarker, $r as BaseAddon, Br as composedDeviceRef, Bt as coreBlockIdFromAddonId, Dt as buildCapabilityLookup, Gn as normalizeCoreBlockWrite, Gr as compositionSourceKey, Ht as coreBlocksCapability, Ji as hydrateSchema, Li as collectSecretMarkerRefs, Lt as compositionSourceRefs, N as DeclaredDevices, Qr as errMsg, Rt as coreBlockAddonId, Sa as transformSecretWrite, Ui as defineRecordKinds, Vt as coreBlockSourceKind, Xt as describeComposableCaps, Zn as planComposition, cr as resolveCoreBlockFiles, h as CORE_BLOCK_ADDON_PREFIX, ha as resolveSecretMarkers, ir as replacedFieldKeys, jr as validateComposition, m as CORE_BLOCKS_ADDON_ID, p as COMPOSER_RUNNER_ID, r as ALL_CAPABILITY_DEFINITIONS, sr as resolveCoreBlockEntry, ta as isSecretRefOwnedBy, va as secretTreeFromSchema, y as CoreBlockSchema, zt as coreBlockComposition } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { t as describeCompositionSources } from "../../composition-sources-bt6IQDLu.mjs";
3
+ import { t as describeCompositionSources } from "../../composition-sources-Ds0Vr6eD.mjs";
4
4
  import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
5
5
  import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
6
6
  import { createRequire } from "node:module";
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  //#region src/builtins/device-history/store/series-registry.ts
8
8
  function subjectIdOf(subject) {
9
9
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -1,4 +1,4 @@
1
- import { Kr as BaseAddon, L as HISTORY_CATALOG, Wr as DeviceType, Yt as deviceRemovalHookCapability, gt as armRemovalReconcile, qt as deviceHistoryCapability, ti as HISTORY_DEFAULT_MIN_INTERVAL_MS, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, $t as deviceHistoryCapability, St as armRemovalReconcile, Ta as EventCategory, Zr as DeviceType, ci as HISTORY_DEFAULT_MIN_INTERVAL_MS, tn as deviceRemovalHookCapability, z as HISTORY_CATALOG } from "../../dist-BSF_C8W2.mjs";
2
2
  //#region src/builtins/device-history/store/series-registry.ts
3
3
  function subjectIdOf(subject) {
4
4
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
9
9
  const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
@@ -1,4 +1,4 @@
1
- import { $t as enumerateItemArrayFields, C as DAY_NAMES, Dt as canonicalIconKey, F as FieldClaimModeSchema, Gi as isSecretClear, Gr as errMsg, Hi as isDeviceConfigCap, Hn as parseStreamParamsFormPatch, Hr as DeviceFeature, Ht as defineExtensionSlotProvider, I as FieldClaimSchema, Ii as defineRecordKinds, Jt as deviceManagerCapability, K as MINUTES_PER_DAY, Ki as isSecretMarker, Kr as BaseAddon, Kt as deviceExtensionCapability, Lt as createDeviceExtensionProvider, M as DeviceStatusSchema, N as DeviceTombstoneSchema, On as locationIconKey, Si as WELL_KNOWN_TAB_MAP, Ur as DeviceRole, Wi as isKeychainStoredField, Wr as DeviceType, Xt as deviceStateCapability, Zt as deviceStatusCapability, c as CAMERA_SWITCH_ORDER, ca as resolveSecretMarkers, en as enumerateSchemaFields, et as STREAM_PROFILE_META, fa as sleep$1, fr as siteZoneKey, ga as userError, ha as transformSecretWrite, ji as collectZodSecretPaths, ln as formatMinutes, ma as toSecretFieldView, or as runtimeStatePolicyFor, qi as isSecretMarkerLike, r as ALL_CAPABILITY_DEFINITIONS, rn as expandContainer, u as CAP_NAMES_WITH_STATUS, ua as secretTreeFromPaths, va as EventCategory, wn as legacyAutoLinkIds, wt as buildStreamParamsConfigSchema, yi as SECRET_CLEAR, zn as normalizeUnit } from "../../dist-7ZciHCIp.mjs";
1
+ import { $i as isSecretMarker, $r as BaseAddon, At as buildStreamParamsConfigSchema, Ca as userError, Ei as SECRET_CLEAR, F as DeviceTombstoneSchema, Fn as locationIconKey, J as MINUTES_PER_DAY, Jt as defineExtensionSlotProvider, Kn as normalizeUnit, L as FieldClaimModeSchema, Nt as canonicalIconKey, P as DeviceStatusSchema, Qi as isSecretClear, Qr as errMsg, Qt as deviceExtensionCapability, R as FieldClaimSchema, Ri as collectZodSecretPaths, Sa as transformSecretWrite, T as DAY_NAMES, Ta as EventCategory, Ui as defineRecordKinds, Ut as createDeviceExtensionProvider, Xr as DeviceRole, Yi as isDeviceConfigCap, Yn as parseStreamParamsFormPatch, Yr as DeviceFeature, Zi as isKeychainStoredField, Zr as DeviceType, _a as secretTreeFromPaths, an as enumerateItemArrayFields, c as CAMERA_SWITCH_ORDER, ea as isSecretMarkerLike, en as deviceManagerCapability, ha as resolveSecretMarkers, hn as formatMinutes, jn as legacyAutoLinkIds, ki as WELL_KNOWN_TAB_MAP, ln as expandContainer, nn as deviceStateCapability, on as enumerateSchemaFields, ot as STREAM_PROFILE_META, pr as runtimeStatePolicyFor, r as ALL_CAPABILITY_DEFINITIONS, rn as deviceStatusCapability, u as CAP_NAMES_WITH_STATUS, xa as toSecretFieldView, ya as sleep$1, yr as siteZoneKey } from "../../dist-BSF_C8W2.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
4
4
  import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
@@ -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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.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 { Kr as BaseAddon, kn as logDestinationCapability } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, In as logDestinationCapability } from "../../dist-BSF_C8W2.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,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-Bi4Ioxop.js");
6
+ const require_dist = require("../../dist-BpqA2CT0.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_device_ca = require("../../device-ca-B3hUVfYk.js");
9
- const require_phase6_declare_gate = require("../../phase6-declare-gate-DwYAep7y.js");
10
- const require_constants = require("../../constants-DBGG6Zu5.js");
8
+ const require_device_ca = require("../../device-ca-bpoEr0zG.js");
9
+ const require_phase6_declare_gate = require("../../phase6-declare-gate-n-IZRklX.js");
10
+ const require_constants = require("../../constants-CavyKfHZ.js");
11
11
  const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
12
12
  let node_crypto = require("node:crypto");
13
13
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,8 +1,8 @@
1
- import { $i as normalizeSecretOwner, B as KEYCHAIN_RESET_TRIGGER_ACTOR, Bi as formatSecretScope, Cn as keychainCapability, H as KeychainResetRecordSchema, Ii as defineRecordKinds, Kr as BaseAddon, Sn as keychainAdminCapability, V as KeychainAuditEntrySchema, na as parseSecretRef, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, An as keychainCapability, H as KEYCHAIN_RESET_TRIGGER_ACTOR, Ta as EventCategory, U as KeychainAuditEntrySchema, Ui as defineRecordKinds, W as KeychainResetRecordSchema, kn as keychainAdminCapability, la as parseSecretRef, oa as normalizeSecretOwner, qi as formatSecretScope } from "../../dist-BSF_C8W2.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-Utfvsx5x.mjs";
4
- import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-D-2LMw9o.mjs";
5
- import { a as MESH_CA_KEY_REF } from "../../constants-DQcVrhVI.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-qz1Pmeu1.mjs";
4
+ import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-B4yfsf2n.mjs";
5
+ import { a as MESH_CA_KEY_REF } from "../../constants-i5oD_gLB.mjs";
6
6
  import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
7
7
  import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
8
8
  import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
@@ -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-Bi4Ioxop.js");
3
+ const require_dist = require("../../dist-BpqA2CT0.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 { Gr as errMsg, Kr as BaseAddon, Mi as createEvent, X as RecordingStatusSchema, Y as RECORDING_SOURCE_CAMSTACK_ADDON, va as EventCategory } from "../../dist-7ZciHCIp.mjs";
1
+ import { $r as BaseAddon, Qr as errMsg, Ta as EventCategory, nt as RecordingStatusSchema, tt as RECORDING_SOURCE_CAMSTACK_ADDON, zi as createEvent } from "../../dist-BSF_C8W2.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";