@camstack/server 1.2.594 → 1.2.596

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 (255) hide show
  1. package/dist/addon-root-inventory.js +50 -11
  2. package/dist/agent/addon-scan.js +44 -6
  3. package/dist/agent/agent-addon-runtime.js +8 -3
  4. package/dist/agent/agent-addon-updates.js +52 -12
  5. package/dist/agent/agent-cap-dispatch-service.js +5 -3
  6. package/dist/agent/agent-config.js +42 -7
  7. package/dist/agent/agent-deploy-swap.js +41 -5
  8. package/dist/agent/agent-group-runner.js +47 -8
  9. package/dist/agent/agent-http-auth.js +22 -10
  10. package/dist/agent/agent-http.js +113 -64
  11. package/dist/agent/agent-hub-addon-update.js +16 -10
  12. package/dist/agent/agent-hub-registration.js +7 -4
  13. package/dist/agent/agent-infra-capabilities.js +9 -5
  14. package/dist/agent/agent-json-file.js +42 -5
  15. package/dist/agent/agent-mesh-gate.js +8 -5
  16. package/dist/agent/agent-node-certificates.js +28 -25
  17. package/dist/agent/agent-pairing-local.js +47 -10
  18. package/dist/agent/agent-pairing-routes.js +20 -16
  19. package/dist/agent/agent-pairing-store.js +58 -18
  20. package/dist/agent/agent-reconnect.js +4 -1
  21. package/dist/agent/agent-service.js +71 -35
  22. package/dist/agent/agent-sniffing-listener.js +48 -11
  23. package/dist/agent/agent-undeploy.js +41 -5
  24. package/dist/agent/agent-update-routes.js +19 -14
  25. package/dist/agent/agent-update-service.js +80 -38
  26. package/dist/agent/apply-model-distribution.js +4 -1
  27. package/dist/agent/apply-stage-dev-uploads.js +9 -6
  28. package/dist/agent/derive-hub-url.js +8 -3
  29. package/dist/agent/fetch-bundle-from-hub.js +9 -6
  30. package/dist/agent/hubs-found.js +43 -6
  31. package/dist/agent/infra-boot-guard.js +4 -1
  32. package/dist/agent/infra-boot-plan.js +6 -2
  33. package/dist/agent/main.js +183 -148
  34. package/dist/agent/register-agent-cap-dispatch.js +6 -3
  35. package/dist/agent/serial-queue.js +7 -2
  36. package/dist/agent-status-page.js +4 -1
  37. package/dist/api/addon-upload.js +61 -22
  38. package/dist/api/agent-addon-delivery.js +11 -6
  39. package/dist/api/auth-whoami.js +4 -1
  40. package/dist/api/backup-download-pump.js +9 -5
  41. package/dist/api/backup-download.js +10 -7
  42. package/dist/api/core/addon-settings.router.js +19 -16
  43. package/dist/api/core/agent-pairing.router.js +79 -76
  44. package/dist/api/core/agents.router.js +24 -21
  45. package/dist/api/core/auth-admin-tokens.procedures.js +52 -48
  46. package/dist/api/core/auth-device-cert.procedures.js +67 -62
  47. package/dist/api/core/auth-limits.js +25 -16
  48. package/dist/api/core/auth-reauth.procedures.js +37 -32
  49. package/dist/api/core/auth-revoke-credentials.procedures.js +26 -22
  50. package/dist/api/core/auth-sessions.procedures.js +56 -52
  51. package/dist/api/core/auth.router.js +304 -300
  52. package/dist/api/core/cap-providers.js +121 -74
  53. package/dist/api/core/capabilities.router.js +37 -34
  54. package/dist/api/core/capability-preference-writes.js +17 -10
  55. package/dist/api/core/certificates.router.js +109 -106
  56. package/dist/api/core/cluster-nodes.router.js +18 -15
  57. package/dist/api/core/collection-preference.js +6 -2
  58. package/dist/api/core/event-bus-proxy.router.js +37 -34
  59. package/dist/api/core/failure-contributions.js +8 -4
  60. package/dist/api/core/hwaccel.router.js +20 -17
  61. package/dist/api/core/integration-secrets.js +12 -8
  62. package/dist/api/core/lifecycle-job-runner.js +49 -13
  63. package/dist/api/core/live-events.router.js +32 -29
  64. package/dist/api/core/load-contributions.js +8 -4
  65. package/dist/api/core/logging-settings.js +43 -30
  66. package/dist/api/core/logs.router.js +43 -40
  67. package/dist/api/core/notifications.router.js +18 -15
  68. package/dist/api/core/public-event-filter.js +8 -4
  69. package/dist/api/core/repl.router.js +21 -18
  70. package/dist/api/core/request-census-settings.js +16 -11
  71. package/dist/api/core/server-management.provider.js +4 -1
  72. package/dist/api/core/server-name.js +17 -9
  73. package/dist/api/core/site-location.js +24 -16
  74. package/dist/api/core/stream-probe.router.js +24 -21
  75. package/dist/api/core/system-events.router.js +26 -23
  76. package/dist/api/cors/cors-policy.js +29 -20
  77. package/dist/api/cors/register-cors-policy.js +14 -9
  78. package/dist/api/deploy-stage-registry.js +10 -6
  79. package/dist/api/dev-uploads-bundle.js +50 -12
  80. package/dist/api/health/adaptive-probe.routes.js +13 -9
  81. package/dist/api/health/health.routes.js +13 -8
  82. package/dist/api/hub-cluster-url.js +9 -3
  83. package/dist/api/model-distributor.js +50 -12
  84. package/dist/api/oauth2/consent-page.js +13 -10
  85. package/dist/api/oauth2/oauth2-routes.js +25 -17
  86. package/dist/api/oauth2/private-host.js +4 -1
  87. package/dist/api/server-upload-propagate.js +51 -15
  88. package/dist/api/server-upload.js +50 -13
  89. package/dist/api/sse-no-compression.js +4 -1
  90. package/dist/api/static/frame-policy.js +9 -4
  91. package/dist/api/static/precompressed-asset.js +57 -15
  92. package/dist/api/static/spa-mount.js +47 -8
  93. package/dist/api/static/spa-static.js +12 -5
  94. package/dist/api/tarball-manifest.js +44 -7
  95. package/dist/api/trpc/cap-mount-helpers.js +12 -7
  96. package/dist/api/trpc/cap-route-error-formatter.js +13 -10
  97. package/dist/api/trpc/cap-router-runtime.js +51 -40
  98. package/dist/api/trpc/client-ip.js +20 -9
  99. package/dist/api/trpc/core-cap-bridge.js +42 -32
  100. package/dist/api/trpc/device-collection-dispatch.js +27 -23
  101. package/dist/api/trpc/device-config-secret-redaction.js +40 -24
  102. package/dist/api/trpc/generated-cap-mounts.js +225 -219
  103. package/dist/api/trpc/generated-cap-routers.js +5167 -4852
  104. package/dist/api/trpc/http-request-census-hook.js +11 -8
  105. package/dist/api/trpc/http-request-census.js +41 -34
  106. package/dist/api/trpc/http-request-census.singleton.js +8 -4
  107. package/dist/api/trpc/localized-schema-paths.js +4 -1
  108. package/dist/api/trpc/principal-visibility.js +22 -14
  109. package/dist/api/trpc/remote-addon-update-grant.js +4 -1
  110. package/dist/api/trpc/scope-access.js +15 -10
  111. package/dist/api/trpc/server-provided-caps.js +7 -3
  112. package/dist/api/trpc/share-view-access.js +14 -6
  113. package/dist/api/trpc/trpc-error-device-tags.js +6 -3
  114. package/dist/api/trpc/trpc-error-principal.js +6 -2
  115. package/dist/api/trpc/trpc.context.js +25 -20
  116. package/dist/api/trpc/trpc.middleware.js +46 -38
  117. package/dist/api/trpc/trpc.router.js +99 -58
  118. package/dist/api/trpc/user-error.js +8 -5
  119. package/dist/api/trpc/ws-request-census.js +24 -17
  120. package/dist/api/trpc/ws-slow-consumer-guard.js +16 -11
  121. package/dist/api/upload-auth.js +9 -5
  122. package/dist/auth/addon-route-jwt-gate.js +7 -4
  123. package/dist/auth/addon-route-share-gate.js +12 -7
  124. package/dist/auth/app-confirm-page.js +22 -17
  125. package/dist/auth/app-confirm-routes.js +31 -26
  126. package/dist/auth/app-confirmations.js +44 -7
  127. package/dist/auth/app-page-shell.js +30 -17
  128. package/dist/auth/app-page-strings.js +17 -11
  129. package/dist/auth/app-passkey-page.js +21 -16
  130. package/dist/auth/app-passkey-routes.js +41 -37
  131. package/dist/auth/app-refused-route.js +18 -13
  132. package/dist/auth/auth-network-policy.js +15 -11
  133. package/dist/auth/auth-provider-gate.js +9 -4
  134. package/dist/auth/auth-rate-limit.js +7 -3
  135. package/dist/auth/client-address.js +9 -6
  136. package/dist/auth/device-enroll-proofs.js +43 -6
  137. package/dist/auth/external-link-intents.js +7 -3
  138. package/dist/auth/hub-sessions.js +12 -6
  139. package/dist/auth/native-link-completions.js +11 -7
  140. package/dist/auth/native-return.js +13 -9
  141. package/dist/auth/passkey-provider.js +32 -26
  142. package/dist/auth/second-factors.js +10 -6
  143. package/dist/auth/session-connections.js +12 -6
  144. package/dist/auth/session-cookie.js +23 -12
  145. package/dist/auth/session-lifetimes.js +12 -8
  146. package/dist/auth/session-mint.js +11 -4
  147. package/dist/auth/sso-finish-app.js +16 -13
  148. package/dist/auth/sso-finish-deps.js +27 -21
  149. package/dist/auth/sso-finish.js +38 -28
  150. package/dist/auth/sso-routes.js +25 -22
  151. package/dist/auth/used-bridge-ids.js +5 -1
  152. package/dist/boot/boot-config.js +55 -16
  153. package/dist/boot/init-sequence.js +4 -1
  154. package/dist/boot/integration-id-backfill.js +8 -3
  155. package/dist/boot/platform-keychain-key.js +42 -5
  156. package/dist/boot/post-boot.service.js +18 -14
  157. package/dist/boot/reconcile-lifecycle-jobs.js +6 -3
  158. package/dist/boot/retired-public-url-env.js +8 -4
  159. package/dist/bootstrap-packages.js +4 -1
  160. package/dist/closure-node-modules.js +38 -2
  161. package/dist/core/addon/addon-call-gateway.js +5 -1
  162. package/dist/core/addon/addon-package.service.js +123 -83
  163. package/dist/core/addon/addon-process-view.js +6 -2
  164. package/dist/core/addon/addon-realign-plan.js +4 -1
  165. package/dist/core/addon/addon-registry.service.js +187 -146
  166. package/dist/core/addon/addon-row-manifest.js +4 -1
  167. package/dist/core/addon/addon-search.service.js +7 -3
  168. package/dist/core/addon/addon-settings-provider.js +3 -1
  169. package/dist/core/addon/addon-uninstall.js +11 -4
  170. package/dist/core/addon/addon.tokens.js +5 -2
  171. package/dist/core/addon/device-meta-mirror.js +13 -8
  172. package/dist/core/addon/forked-custom-actions.js +11 -6
  173. package/dist/core/addon/integration-visibility.js +6 -3
  174. package/dist/core/addon/materialize-route-path.js +4 -1
  175. package/dist/core/addon/package-dir-utils.js +45 -8
  176. package/dist/core/addon/prune-misplaced-addons.js +43 -5
  177. package/dist/core/addon/runner-convergence.js +4 -1
  178. package/dist/core/addon/runner-serialization.js +4 -1
  179. package/dist/core/addon/runner-spawn-fanout.js +8 -3
  180. package/dist/core/addon/settings-door-wiring.js +8 -5
  181. package/dist/core/addon/single-flight-refresh.js +4 -1
  182. package/dist/core/addon-bridge/addon-bridge.service.js +44 -7
  183. package/dist/core/addon-pages/addon-pages.service.js +40 -3
  184. package/dist/core/addon-widgets/addon-widgets.service.js +42 -4
  185. package/dist/core/agent/agent-addon-backfill.js +17 -9
  186. package/dist/core/agent/agent-delivery-ledger.js +7 -3
  187. package/dist/core/agent/agent-liveness-event.js +6 -2
  188. package/dist/core/agent/agent-pairing-http.js +45 -41
  189. package/dist/core/agent/agent-registry.service.js +89 -50
  190. package/dist/core/agent/cluster-node-history-mirror.js +7 -3
  191. package/dist/core/agent/cluster-node-history-store.js +35 -31
  192. package/dist/core/agent/hub-agent-pairing.js +5 -1
  193. package/dist/core/agent/node-certificates-client.js +6 -3
  194. package/dist/core/agent/node-directory.js +4 -1
  195. package/dist/core/app-links/well-known-app-links.js +6 -2
  196. package/dist/core/auth/auth.service.js +8 -3
  197. package/dist/core/auth/handoff-code.service.js +49 -11
  198. package/dist/core/auth/record-kinds.js +19 -16
  199. package/dist/core/auth/share-token.service.js +79 -42
  200. package/dist/core/capability/capability.service.js +5 -1
  201. package/dist/core/config/config.schema.js +6 -1
  202. package/dist/core/config/config.service.js +6 -2
  203. package/dist/core/events/event-bus.service.js +7 -3
  204. package/dist/core/feature/feature.service.js +6 -2
  205. package/dist/core/lifecycle/lifecycle-runner.singleton.js +10 -5
  206. package/dist/core/lifecycle/lifecycle-state-machine.js +5 -1
  207. package/dist/core/logging/log-ring-buffer.js +5 -1
  208. package/dist/core/logging/logging.service.js +9 -5
  209. package/dist/core/logging/scoped-logger.js +5 -1
  210. package/dist/core/moleculer/agent-readiness-pull.js +4 -1
  211. package/dist/core/moleculer/agent-registration-request.js +7 -3
  212. package/dist/core/moleculer/cap-call-fn.js +7 -4
  213. package/dist/core/moleculer/cap-route-authority.js +8 -3
  214. package/dist/core/moleculer/hub-mesh-guard.js +9 -5
  215. package/dist/core/moleculer/moleculer.service.js +86 -79
  216. package/dist/core/network/network-quality.service.js +6 -2
  217. package/dist/core/notification/notification-wrapper.service.js +7 -3
  218. package/dist/core/notification/toast-wrapper.service.js +7 -3
  219. package/dist/core/provider/provider.tokens.js +4 -1
  220. package/dist/core/repl/repl-engine.service.js +8 -4
  221. package/dist/core/runner-health/runner-boot-check.js +15 -7
  222. package/dist/core/runner-health/update-preflight.js +14 -9
  223. package/dist/core/server-update/server-update.service.js +49 -12
  224. package/dist/core/server-update/system-apply-closure-patches.js +42 -6
  225. package/dist/core/server-update/system-ensure-prebuilds.js +6 -3
  226. package/dist/core/server-update/system-exec-npm.js +5 -2
  227. package/dist/core/storage/fs-storage-backend.js +5 -1
  228. package/dist/core/storage/storage-location-manager.js +5 -1
  229. package/dist/core/storage/storage.service.js +6 -2
  230. package/dist/core/streaming/ffmpeg-stream-info.js +8 -3
  231. package/dist/core/streaming/stream-probe.service.js +16 -12
  232. package/dist/core/streaming/ttl-cache.js +5 -1
  233. package/dist/core/topology/topology-emitter.service.js +23 -19
  234. package/dist/core/update-availability-emitter.js +7 -3
  235. package/dist/core/update-availability-store.js +45 -8
  236. package/dist/core/updates/agent-installed-packages.js +9 -5
  237. package/dist/core/updates/restart-marker.js +8 -3
  238. package/dist/core/updates/update-check-scheduler.js +18 -13
  239. package/dist/core/updates/wrapper-update-checker.js +7 -3
  240. package/dist/first-boot-addon-plan.js +6 -2
  241. package/dist/framework-nodepath.js +38 -2
  242. package/dist/i18n/request-lang.js +11 -7
  243. package/dist/launcher.js +65 -30
  244. package/dist/lifecycle-journal-path.js +38 -2
  245. package/dist/main.js +324 -286
  246. package/dist/manual-boot.js +156 -117
  247. package/dist/node-role.js +4 -1
  248. package/dist/package-inventory.js +48 -7
  249. package/dist/pending-restore.js +43 -7
  250. package/dist/single-copy-cleanup-runner.js +45 -9
  251. package/dist/single-copy-cleanup.js +15 -7
  252. package/dist/sqlite-restore.js +48 -9
  253. package/dist/starter.js +39 -4
  254. package/dist/ui-serving/lazy-ui-serving.js +39 -3
  255. package/package.json +7 -7
@@ -1,10 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.readJsonFile = readJsonFile;
37
+ exports.writeJsonFile0600 = writeJsonFile0600;
1
38
  /**
2
39
  * `agent.json` read/write helpers. The file is owner-only on every OS (an owner+SYSTEM ACL on
3
40
  * Windows, where 0600 is a no-op) because it holds the mesh private key.
4
41
  */
5
- import * as fs from 'node:fs';
6
- import { writeOwnerOnlyFileSync } from '@camstack/types/node';
7
- export function readJsonFile(file) {
42
+ const fs = __importStar(require("node:fs"));
43
+ const node_1 = require("@camstack/types/node");
44
+ function readJsonFile(file) {
8
45
  if (!fs.existsSync(file))
9
46
  return {};
10
47
  try {
@@ -17,6 +54,6 @@ export function readJsonFile(file) {
17
54
  return {};
18
55
  }
19
56
  }
20
- export function writeJsonFile0600(file, data) {
21
- writeOwnerOnlyFileSync(file, JSON.stringify(data, null, 2));
57
+ function writeJsonFile0600(file, data) {
58
+ (0, node_1.writeOwnerOnlyFileSync)(file, JSON.stringify(data, null, 2));
22
59
  }
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAgentMeshGate = createAgentMeshGate;
1
4
  /**
2
5
  * The agent's mesh gate (D802, D857): only the hub may call this agent, and the
3
6
  * hub is recognised by its CERTIFICATE — the agent's own TLS listener accepted
@@ -11,13 +14,13 @@
11
14
  *
12
15
  * Also here: the agent's outbound event scope (D848) — its events go to the hub only.
13
16
  */
14
- import { AgentMeshIdentityGate, createAgentEventScope, createMeshAccessMiddleware, } from '@camstack/system';
17
+ const system_1 = require("@camstack/system");
15
18
  const HUB_NODE_ID = 'hub';
16
19
  /** At most one "refused" line per sender per this long. */
17
20
  const REFUSED_LOG_INTERVAL_MS = 60_000;
18
- export function createAgentMeshGate(opts) {
21
+ function createAgentMeshGate(opts) {
19
22
  const lastLoggedAt = new Map();
20
- const gate = new AgentMeshIdentityGate({
23
+ const gate = new system_1.AgentMeshIdentityGate({
21
24
  ownNodeId: opts.nodeId,
22
25
  hubNodeId: HUB_NODE_ID,
23
26
  isVerifiedPeer: opts.isVerifiedPeer,
@@ -32,11 +35,11 @@ export function createAgentMeshGate(opts) {
32
35
  opts.log?.(`mesh inbound: "${nodeId}" is not the certified hub — refused (first call: ${what})`);
33
36
  },
34
37
  });
35
- const eventScope = createAgentEventScope({
38
+ const eventScope = (0, system_1.createAgentEventScope)({
36
39
  hubNodeId: HUB_NODE_ID,
37
40
  ...(opts.log !== undefined ? { log: opts.log } : {}),
38
41
  });
39
- const inbound = createMeshAccessMiddleware({
42
+ const inbound = (0, system_1.createMeshAccessMiddleware)({
40
43
  ownNodeId: opts.nodeId,
41
44
  gate,
42
45
  logger: {
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAgentNodeCertificates = createAgentNodeCertificates;
1
4
  /**
2
5
  * The agent's side of certificate management (D856): the `node-certificates`
3
6
  * capability, provided by the agent runtime and called by the hub through the
@@ -21,9 +24,9 @@
21
24
  * HTTPS leaf. Same shape: key pair + CSR here, signed public key back, ONE atomic file
22
25
  * under `<dataDir>/tls`, hot-swapped into the sniffing listener.
23
26
  */
24
- import { createPrivateKey, X509Certificate } from 'node:crypto';
25
- import { collectAgentNames, createAgentHttpsRequest, createMeshCsrPem, describeHttpsLeaf, describeMeshLeaf, exportMeshPrivateKeyPem, generateMeshKeyPair, installAgentHttps, loadAgentHttps, pinnedHttpsCaFingerprint, } from '@camstack/system';
26
- import { readJsonFile, writeJsonFile0600 } from './agent-json-file.js';
27
+ const node_crypto_1 = require("node:crypto");
28
+ const system_1 = require("@camstack/system");
29
+ const agent_json_file_js_1 = require("./agent-json-file.js");
27
30
  /** Let the capability answer before the broker is torn down and rebuilt. */
28
31
  const RECONNECT_DELAY_MS = 400;
29
32
  /** A swap found pending at boot gets at least this long for the hub to confirm. */
@@ -46,7 +49,7 @@ function defaultSchedule(fn, ms) {
46
49
  timer.unref?.();
47
50
  return { cancel: () => clearTimeout(timer) };
48
51
  }
49
- export function createAgentNodeCertificates(deps) {
52
+ function createAgentNodeCertificates(deps) {
50
53
  const { nodeId, log } = deps;
51
54
  const tags = { nodeId };
52
55
  const schedule = deps.schedule ?? defaultSchedule;
@@ -54,7 +57,7 @@ export function createAgentNodeCertificates(deps) {
54
57
  let pendingKeyPem = null;
55
58
  let rollbackTimer = null;
56
59
  const readMesh = () => {
57
- const raw = readJsonFile(deps.configPath);
60
+ const raw = (0, agent_json_file_js_1.readJsonFile)(deps.configPath);
58
61
  return {
59
62
  current: isMeshMaterial(raw['meshTls']) ? raw['meshTls'] : null,
60
63
  previous: isMeshMaterial(raw['meshTlsPrevious']) ? raw['meshTlsPrevious'] : null,
@@ -63,7 +66,7 @@ export function createAgentNodeCertificates(deps) {
63
66
  };
64
67
  const stillValid = (material) => {
65
68
  try {
66
- return describeMeshLeaf(material.certPem).notAfter > now();
69
+ return (0, system_1.describeMeshLeaf)(material.certPem).notAfter > now();
67
70
  }
68
71
  catch {
69
72
  return false;
@@ -71,9 +74,9 @@ export function createAgentNodeCertificates(deps) {
71
74
  };
72
75
  /** Write `agent.json` with the swap leftovers removed and `meshTls` optionally replaced. */
73
76
  const writeSettled = (replaceCurrent) => {
74
- const raw = readJsonFile(deps.configPath);
77
+ const raw = (0, agent_json_file_js_1.readJsonFile)(deps.configPath);
75
78
  const { meshTlsPrevious: _p, meshSwap: _s, ...rest } = raw;
76
- writeJsonFile0600(deps.configPath, {
79
+ (0, agent_json_file_js_1.writeJsonFile0600)(deps.configPath, {
77
80
  ...rest,
78
81
  ...(replaceCurrent !== undefined ? { meshTls: replaceCurrent } : {}),
79
82
  });
@@ -156,13 +159,13 @@ export function createAgentNodeCertificates(deps) {
156
159
  return {
157
160
  getCertificates: async () => {
158
161
  const { current } = readMesh();
159
- const https = loadAgentHttps(deps.dataDir, (reason) => log.error('The HTTPS bundle on disk is unusable - serving plain HTTP only', {
162
+ const https = (0, system_1.loadAgentHttps)(deps.dataDir, (reason) => log.error('The HTTPS bundle on disk is unusable - serving plain HTTP only', {
160
163
  tags,
161
164
  meta: { reason },
162
165
  }));
163
166
  let mesh = null;
164
167
  if (current !== null) {
165
- const leaf = describeMeshLeaf(current.certPem);
168
+ const leaf = (0, system_1.describeMeshLeaf)(current.certPem);
166
169
  mesh = {
167
170
  cn: leaf.cn,
168
171
  serial: leaf.serial,
@@ -179,7 +182,7 @@ export function createAgentNodeCertificates(deps) {
179
182
  state: 'not-issued',
180
183
  reason: 'No hub-issued HTTPS certificate has been installed on this node yet.',
181
184
  }
182
- : { state: 'served', leaf: describeHttpsLeaf(https.certPem) },
185
+ : { state: 'served', leaf: (0, system_1.describeHttpsLeaf)(https.certPem) },
183
186
  };
184
187
  },
185
188
  prepareMeshRenewal: async () => {
@@ -192,9 +195,9 @@ export function createAgentNodeCertificates(deps) {
192
195
  }
193
196
  // A leftover from a finished or failed swap is never a rollback target.
194
197
  writeSettled();
195
- const keys = await generateMeshKeyPair();
196
- pendingKeyPem = await exportMeshPrivateKeyPem(keys.privateKey);
197
- const csrPem = await createMeshCsrPem(keys, nodeId);
198
+ const keys = await (0, system_1.generateMeshKeyPair)();
199
+ pendingKeyPem = await (0, system_1.exportMeshPrivateKeyPem)(keys.privateKey);
200
+ const csrPem = await (0, system_1.createMeshCsrPem)(keys, nodeId);
198
201
  log.info('Mesh leaf renewal: new key and CSR generated', { tags });
199
202
  return { csrPem };
200
203
  },
@@ -205,9 +208,9 @@ export function createAgentNodeCertificates(deps) {
205
208
  if (pendingKeyPem === null) {
206
209
  throw new Error('no pending key: prepareMeshRenewal was not called (or the node restarted)');
207
210
  }
208
- const leaf = new X509Certificate(input.certPem);
209
- const ca = new X509Certificate(input.caCertPem);
210
- const currentCa = new X509Certificate(current.caCertPem);
211
+ const leaf = new node_crypto_1.X509Certificate(input.certPem);
212
+ const ca = new node_crypto_1.X509Certificate(input.caCertPem);
213
+ const currentCa = new node_crypto_1.X509Certificate(current.caCertPem);
211
214
  if (ca.fingerprint256 !== currentCa.fingerprint256) {
212
215
  throw new Error('the CA that came with the new leaf is not the CA this node trusts');
213
216
  }
@@ -216,15 +219,15 @@ export function createAgentNodeCertificates(deps) {
216
219
  if (!new RegExp(`(?:^|\\n)CN=${nodeId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(?:\\n|$)`).test(leaf.subject)) {
217
220
  throw new Error(`the new leaf is not issued for "${nodeId}"`);
218
221
  }
219
- if (!leaf.checkPrivateKey(createPrivateKey(pendingKeyPem))) {
222
+ if (!leaf.checkPrivateKey((0, node_crypto_1.createPrivateKey)(pendingKeyPem))) {
220
223
  throw new Error('the new leaf does not match the key this node generated');
221
224
  }
222
- const raw = readJsonFile(deps.configPath);
225
+ const raw = (0, agent_json_file_js_1.readJsonFile)(deps.configPath);
223
226
  const swap = {
224
227
  fingerprint: leaf.fingerprint256,
225
228
  deadline: now() + input.confirmWithinMs,
226
229
  };
227
- writeJsonFile0600(deps.configPath, {
230
+ (0, agent_json_file_js_1.writeJsonFile0600)(deps.configPath, {
228
231
  ...raw,
229
232
  meshTls: { certPem: input.certPem, keyPem: pendingKeyPem, caCertPem: current.caCertPem },
230
233
  meshTlsPrevious: current,
@@ -257,8 +260,8 @@ export function createAgentNodeCertificates(deps) {
257
260
  return { ok: true };
258
261
  },
259
262
  prepareHttpsCertificate: async () => {
260
- const names = collectAgentNames(nodeId, deps.hostFacts);
261
- const request = await createAgentHttpsRequest(deps.dataDir, nodeId, names);
263
+ const names = (0, system_1.collectAgentNames)(nodeId, deps.hostFacts);
264
+ const request = await (0, system_1.createAgentHttpsRequest)(deps.dataDir, nodeId, names);
262
265
  log.info('HTTPS certificate: new key and CSR generated', {
263
266
  tags,
264
267
  meta: { hostnames: names.hostnames.length, addresses: names.addresses.length },
@@ -267,11 +270,11 @@ export function createAgentNodeCertificates(deps) {
267
270
  csrPem: request.csrPem,
268
271
  hostnames: [...names.hostnames],
269
272
  addresses: [...names.addresses],
270
- pinnedCaFingerprintSha256: pinnedHttpsCaFingerprint(deps.dataDir),
273
+ pinnedCaFingerprintSha256: (0, system_1.pinnedHttpsCaFingerprint)(deps.dataDir),
271
274
  };
272
275
  },
273
276
  installHttpsCertificate: async (input) => {
274
- const material = installAgentHttps(deps.dataDir, input);
277
+ const material = (0, system_1.installAgentHttps)(deps.dataDir, input);
275
278
  const listener = deps.getHttpsListener();
276
279
  if (listener === null) {
277
280
  log.warn('HTTPS certificate installed on disk but the agent HTTP listener is not up', {
@@ -283,7 +286,7 @@ export function createAgentNodeCertificates(deps) {
283
286
  tags,
284
287
  });
285
288
  }
286
- const leaf = describeHttpsLeaf(material.certPem);
289
+ const leaf = (0, system_1.describeHttpsLeaf)(material.certPem);
287
290
  log.info('HTTPS certificate installed and hot-swapped', {
288
291
  tags,
289
292
  meta: {
@@ -1,3 +1,40 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PAIRING_RESET_FILE = exports.PAIRING_PIN_FILE = void 0;
37
+ exports.createLocalPairingAnnouncer = createLocalPairingAnnouncer;
1
38
  /**
2
39
  * Where a pairing's one-time PIN, the agent's own code and the reset code are shown: ONLY on the
3
40
  * agent's machine (D857).
@@ -8,11 +45,11 @@
8
45
  * desktop window (which asks the agent's loopback `status`) - and types the hub's code and the PIN
9
46
  * into the page.
10
47
  */
11
- import * as fs from 'node:fs';
12
- import * as path from 'node:path';
13
- import { writeOwnerOnlyFileSync } from '@camstack/types/node';
14
- export const PAIRING_PIN_FILE = 'pairing-pin.txt';
15
- export const PAIRING_RESET_FILE = 'pairing-reset.txt';
48
+ const fs = __importStar(require("node:fs"));
49
+ const path = __importStar(require("node:path"));
50
+ const node_1 = require("@camstack/types/node");
51
+ exports.PAIRING_PIN_FILE = 'pairing-pin.txt';
52
+ exports.PAIRING_RESET_FILE = 'pairing-reset.txt';
16
53
  function describe(s) {
17
54
  const fp = s.hub.caFingerprint.slice(0, 16);
18
55
  return [
@@ -27,9 +64,9 @@ function describe(s) {
27
64
  * holds exactly the live ones and is removed when none is left - and a stale one left by a previous
28
65
  * run is removed here, at boot. A PIN is never logged anywhere else.
29
66
  */
30
- export function createLocalPairingAnnouncer(dataDir, log) {
31
- const file = path.join(dataDir, PAIRING_PIN_FILE);
32
- const resetFile = path.join(dataDir, PAIRING_RESET_FILE);
67
+ function createLocalPairingAnnouncer(dataDir, log) {
68
+ const file = path.join(dataDir, exports.PAIRING_PIN_FILE);
69
+ const resetFile = path.join(dataDir, exports.PAIRING_RESET_FILE);
33
70
  const live = new Map();
34
71
  const flush = () => {
35
72
  try {
@@ -38,7 +75,7 @@ export function createLocalPairingAnnouncer(dataDir, log) {
38
75
  return;
39
76
  }
40
77
  fs.mkdirSync(dataDir, { recursive: true });
41
- writeOwnerOnlyFileSync(file, `${[...live.values()].map(describe).join('\n\n')}\n`);
78
+ (0, node_1.writeOwnerOnlyFileSync)(file, `${[...live.values()].map(describe).join('\n\n')}\n`);
42
79
  }
43
80
  catch (err) {
44
81
  log.warn(`could not write ${file}: ${err instanceof Error ? err.message : String(err)} - the PIN is in the console above`);
@@ -61,7 +98,7 @@ export function createLocalPairingAnnouncer(dataDir, log) {
61
98
  log.warn(`\nPairing reset code: ${code}\n (clears pairing lockouts and pending offers: POST /api/agent/pairing/reset {"code": ...}; also in ${resetFile})`);
62
99
  try {
63
100
  fs.mkdirSync(dataDir, { recursive: true });
64
- writeOwnerOnlyFileSync(resetFile, `${code}\n`);
101
+ (0, node_1.writeOwnerOnlyFileSync)(resetFile, `${code}\n`);
65
102
  }
66
103
  catch (err) {
67
104
  log.warn(`could not write ${resetFile}: ${err instanceof Error ? err.message : String(err)} - the code is in the console above`);
@@ -1,11 +1,15 @@
1
- import { PAIRING_PATHS, } from '@camstack/system';
2
- import { authInputOf, isGenuineLoopback } from './agent-http-auth.js';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isLocalRequest = isLocalRequest;
4
+ exports.registerAgentPairingRoutes = registerAgentPairingRoutes;
5
+ const system_1 = require("@camstack/system");
6
+ const agent_http_auth_js_1 = require("./agent-http-auth.js");
3
7
  const OFFER_WINDOW_MS = 60_000;
4
8
  const DEFAULT_OFFERS_PER_MINUTE = 10;
5
9
  const MAX_TRACKED_SOURCES = 512;
6
10
  /** True for a request from this machine itself: loopback peer, no forwarding header. */
7
- export function isLocalRequest(req) {
8
- return isGenuineLoopback(authInputOf(req));
11
+ function isLocalRequest(req) {
12
+ return (0, agent_http_auth_js_1.isGenuineLoopback)((0, agent_http_auth_js_1.authInputOf)(req));
9
13
  }
10
14
  function send(reply, result) {
11
15
  if (result.ok)
@@ -21,7 +25,7 @@ function send(reply, result) {
21
25
  ...(failure.retryAfterMs !== undefined ? { retryAfterMs: failure.retryAfterMs } : {}),
22
26
  });
23
27
  }
24
- export function registerAgentPairingRoutes(app, deps) {
28
+ function registerAgentPairingRoutes(app, deps) {
25
29
  const { pairing } = deps;
26
30
  const now = deps.now ?? Date.now;
27
31
  const limit = deps.offersPerMinute ?? DEFAULT_OFFERS_PER_MINUTE;
@@ -40,10 +44,10 @@ export function registerAgentPairingRoutes(app, deps) {
40
44
  offersBySource.set(source, [...recent, at]);
41
45
  return false;
42
46
  };
43
- app.get(PAIRING_PATHS.hello, async () => pairing.hello());
47
+ app.get(system_1.PAIRING_PATHS.hello, async () => pairing.hello());
44
48
  // The network sees who asks; the agent's own machine sees the secrets.
45
- app.get(PAIRING_PATHS.status, async (req) => isLocalRequest(req) ? pairing.localView() : pairing.publicView());
46
- app.post(PAIRING_PATHS.offer, async (req, reply) => {
49
+ app.get(system_1.PAIRING_PATHS.status, async (req) => isLocalRequest(req) ? pairing.localView() : pairing.publicView());
50
+ app.post(system_1.PAIRING_PATHS.offer, async (req, reply) => {
47
51
  if (rateLimited(req.socket.remoteAddress ?? 'unknown')) {
48
52
  deps.log(`pairing offers from ${req.socket.remoteAddress ?? 'unknown'} are rate limited`);
49
53
  return reply.status(429).header('retry-after', '60').send({
@@ -54,20 +58,20 @@ export function registerAgentPairingRoutes(app, deps) {
54
58
  }
55
59
  return send(reply, await pairing.offer(req.body));
56
60
  });
57
- app.post(PAIRING_PATHS.reveal, async (req, reply) => send(reply, pairing.reveal(req.body)));
58
- app.post(PAIRING_PATHS.poll, async (req, reply) => send(reply, pairing.poll(req.body)));
59
- app.post(PAIRING_PATHS.cancel, async (req, reply) => send(reply, pairing.cancel(req.body)));
60
- app.post(PAIRING_PATHS.complete, async (req, reply) => send(reply, await pairing.complete(req.body)));
61
+ app.post(system_1.PAIRING_PATHS.reveal, async (req, reply) => send(reply, pairing.reveal(req.body)));
62
+ app.post(system_1.PAIRING_PATHS.poll, async (req, reply) => send(reply, pairing.poll(req.body)));
63
+ app.post(system_1.PAIRING_PATHS.cancel, async (req, reply) => send(reply, pairing.cancel(req.body)));
64
+ app.post(system_1.PAIRING_PATHS.complete, async (req, reply) => send(reply, await pairing.complete(req.body)));
61
65
  const contextOf = (req) => ({
62
66
  local: isLocalRequest(req),
63
67
  source: req.socket.remoteAddress ?? 'unknown',
64
68
  });
65
- app.post(PAIRING_PATHS.confirm, async (req, reply) => send(reply, pairing.confirm(req.body, contextOf(req))));
66
- app.post(PAIRING_PATHS.reject, async (req, reply) => send(reply, pairing.reject(req.body, contextOf(req))));
69
+ app.post(system_1.PAIRING_PATHS.confirm, async (req, reply) => send(reply, pairing.confirm(req.body, contextOf(req))));
70
+ app.post(system_1.PAIRING_PATHS.reject, async (req, reply) => send(reply, pairing.reject(req.body, contextOf(req))));
67
71
  // Clears the offer lockouts and pending offers: this machine, or the reset code printed at boot.
68
- app.post(PAIRING_PATHS.reset, async (req, reply) => send(reply, pairing.reset(req.body, contextOf(req))));
72
+ app.post(system_1.PAIRING_PATHS.reset, async (req, reply) => send(reply, pairing.reset(req.body, contextOf(req))));
69
73
  // Authenticated by the onRequest hook (not a protocol path): this machine or a hub session.
70
- app.post(PAIRING_PATHS.forget, async (_req, reply) => {
74
+ app.post(system_1.PAIRING_PATHS.forget, async (_req, reply) => {
71
75
  if (pairing.state() !== 'paired') {
72
76
  return reply
73
77
  .status(409)
@@ -1,17 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.isAgentPaired = isAgentPaired;
37
+ exports.pinnedMeshCaCert = pinnedMeshCaCert;
38
+ exports.persistPairing = persistPairing;
39
+ exports.forgetPairing = forgetPairing;
40
+ exports.pairedLeafFingerprint = pairedLeafFingerprint;
1
41
  /**
2
42
  * What pairing writes to, and removes from, `agent.json` (D857). The file is
3
43
  * 0600 on every OS; this module only ever touches the keys named below. An older
4
44
  * `secret` field is neither read nor removed here — the operator deletes it.
5
45
  */
6
- import { X509Certificate } from 'node:crypto';
7
- import * as fs from 'node:fs';
8
- import { agentHttpsPaths } from '@camstack/system';
9
- import { readJsonFile, writeJsonFile0600 } from './agent-json-file.js';
46
+ const node_crypto_1 = require("node:crypto");
47
+ const fs = __importStar(require("node:fs"));
48
+ const system_1 = require("@camstack/system");
49
+ const agent_json_file_js_1 = require("./agent-json-file.js");
10
50
  /** Keys that exist only while this agent is paired. */
11
51
  const PAIRED_KEYS = ['meshTls', 'meshTlsPrevious', 'meshSwap', 'hubAddress'];
12
52
  /** `agent.json` holds mesh material: the agent is paired. */
13
- export function isAgentPaired(configPath) {
14
- const meshTls = readJsonFile(configPath)['meshTls'];
53
+ function isAgentPaired(configPath) {
54
+ const meshTls = (0, agent_json_file_js_1.readJsonFile)(configPath)['meshTls'];
15
55
  return (meshTls !== null &&
16
56
  typeof meshTls === 'object' &&
17
57
  typeof Reflect.get(meshTls, 'certPem') === 'string' &&
@@ -19,17 +59,17 @@ export function isAgentPaired(configPath) {
19
59
  typeof Reflect.get(meshTls, 'caCertPem') === 'string');
20
60
  }
21
61
  /** The CA certificate this agent pinned at pairing, or `null` while unpaired. */
22
- export function pinnedMeshCaCert(configPath) {
23
- const meshTls = readJsonFile(configPath)['meshTls'];
62
+ function pinnedMeshCaCert(configPath) {
63
+ const meshTls = (0, agent_json_file_js_1.readJsonFile)(configPath)['meshTls'];
24
64
  if (meshTls === null || typeof meshTls !== 'object')
25
65
  return null;
26
66
  const ca = Reflect.get(meshTls, 'caCertPem');
27
67
  return typeof ca === 'string' && ca.length > 0 ? ca : null;
28
68
  }
29
69
  /** Persist a completed pairing: the leaf, its key, the pinned CA and the hub's host. */
30
- export function persistPairing(configPath, pairing) {
31
- const { meshTlsPrevious: _previous, meshSwap: _swap, ...existing } = readJsonFile(configPath);
32
- writeJsonFile0600(configPath, {
70
+ function persistPairing(configPath, pairing) {
71
+ const { meshTlsPrevious: _previous, meshSwap: _swap, ...existing } = (0, agent_json_file_js_1.readJsonFile)(configPath);
72
+ (0, agent_json_file_js_1.writeJsonFile0600)(configPath, {
33
73
  ...existing,
34
74
  hubAddress: pairing.hubAddress,
35
75
  meshTls: pairing.meshTls,
@@ -39,22 +79,22 @@ export function persistPairing(configPath, pairing) {
39
79
  * Leave the hub: erase the mesh material, the hub address and the HTTPS bundle
40
80
  * the hub issued. The agent is unpaired afterwards and accepts offers again.
41
81
  */
42
- export function forgetPairing(configPath, dataDir) {
43
- const existing = readJsonFile(configPath);
44
- writeJsonFile0600(configPath, Object.fromEntries(Object.entries(existing).filter(([key]) => !PAIRED_KEYS.includes(key))));
45
- const https = agentHttpsPaths(dataDir);
82
+ function forgetPairing(configPath, dataDir) {
83
+ const existing = (0, agent_json_file_js_1.readJsonFile)(configPath);
84
+ (0, agent_json_file_js_1.writeJsonFile0600)(configPath, Object.fromEntries(Object.entries(existing).filter(([key]) => !PAIRED_KEYS.includes(key))));
85
+ const https = (0, system_1.agentHttpsPaths)(dataDir);
46
86
  for (const file of [https.bundlePath, https.certPath, https.pendingKeyPath]) {
47
87
  fs.rmSync(file, { force: true });
48
88
  }
49
89
  }
50
90
  /** First 16 hex chars of the SHA-256 of the agent's mesh leaf, `null` while unpaired. */
51
- export function pairedLeafFingerprint(configPath) {
52
- const meshTls = readJsonFile(configPath)['meshTls'];
91
+ function pairedLeafFingerprint(configPath) {
92
+ const meshTls = (0, agent_json_file_js_1.readJsonFile)(configPath)['meshTls'];
53
93
  const certPem = meshTls !== null && typeof meshTls === 'object' ? Reflect.get(meshTls, 'certPem') : null;
54
94
  if (typeof certPem !== 'string')
55
95
  return null;
56
96
  try {
57
- return new X509Certificate(certPem).fingerprint256
97
+ return new node_crypto_1.X509Certificate(certPem).fingerprint256
58
98
  .replaceAll(':', '')
59
99
  .toLowerCase()
60
100
  .slice(0, 16);
@@ -1,4 +1,7 @@
1
- export function createReconnectRunner(deps) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createReconnectRunner = createReconnectRunner;
4
+ function createReconnectRunner(deps) {
2
5
  let generation = 0;
3
6
  return async () => {
4
7
  const mine = ++generation;