@naylence/runtime 0.3.6 → 0.3.9

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 (82) hide show
  1. package/dist/browser/index.cjs +262 -172
  2. package/dist/browser/index.mjs +261 -173
  3. package/dist/cjs/_env-shim.js +3 -1
  4. package/dist/cjs/naylence/fame/config/extended-fame-config.js +2 -1
  5. package/dist/cjs/naylence/fame/connector/broadcast-channel-connector-factory.js +12 -4
  6. package/dist/cjs/naylence/fame/connector/broadcast-channel-connector.browser.js +14 -6
  7. package/dist/cjs/naylence/fame/connector/broadcast-channel-listener-factory.js +3 -1
  8. package/dist/cjs/naylence/fame/connector/broadcast-channel-listener.js +11 -7
  9. package/dist/cjs/naylence/fame/connector/index.js +2 -1
  10. package/dist/cjs/naylence/fame/connector/inpage-connector-factory.js +2 -1
  11. package/dist/cjs/naylence/fame/connector/inpage-connector.js +13 -6
  12. package/dist/cjs/naylence/fame/connector/inpage-listener-factory.js +4 -4
  13. package/dist/cjs/naylence/fame/connector/inpage-listener.js +5 -2
  14. package/dist/cjs/naylence/fame/delivery/default-delivery-tracker.js +4 -62
  15. package/dist/cjs/naylence/fame/fabric/fabric-registry.js +41 -0
  16. package/dist/cjs/naylence/fame/fabric/in-process-fame-fabric.js +3 -0
  17. package/dist/cjs/naylence/fame/fabric/index.js +3 -1
  18. package/dist/cjs/naylence/fame/grants/broadcast-channel-connection-grant.js +6 -3
  19. package/dist/cjs/naylence/fame/grants/inpage-connection-grant.js +4 -2
  20. package/dist/cjs/naylence/fame/http/oauth2-token-router.js +9 -9
  21. package/dist/cjs/naylence/fame/node/admission/default-node-attach-client.js +34 -5
  22. package/dist/cjs/naylence/fame/node/upstream-session-manager.js +40 -8
  23. package/dist/cjs/naylence/fame/security/auth/oauth2-pkce-token-provider-factory.js +10 -6
  24. package/dist/cjs/naylence/fame/security/auth/oauth2-pkce-token-provider.js +1 -2
  25. package/dist/cjs/naylence/fame/security/default-security-manager.js +2 -1
  26. package/dist/cjs/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +2 -2
  27. package/dist/cjs/naylence/fame/security/trust-store/trust-store-provider-factory.js +2 -2
  28. package/dist/cjs/naylence/fame/util/index.js +3 -1
  29. package/dist/cjs/node.js +4 -1
  30. package/dist/cjs/runtime-isomorphic.js +4 -1
  31. package/dist/cjs/version.js +2 -2
  32. package/dist/esm/_env-shim.js +3 -1
  33. package/dist/esm/browser.js +2 -2
  34. package/dist/esm/naylence/fame/config/extended-fame-config.js +2 -1
  35. package/dist/esm/naylence/fame/connector/broadcast-channel-connector-factory.js +12 -4
  36. package/dist/esm/naylence/fame/connector/broadcast-channel-connector.browser.js +14 -6
  37. package/dist/esm/naylence/fame/connector/broadcast-channel-listener-factory.js +3 -1
  38. package/dist/esm/naylence/fame/connector/broadcast-channel-listener.js +11 -7
  39. package/dist/esm/naylence/fame/connector/index.js +2 -2
  40. package/dist/esm/naylence/fame/connector/inpage-connector-factory.js +2 -1
  41. package/dist/esm/naylence/fame/connector/inpage-connector.js +13 -6
  42. package/dist/esm/naylence/fame/connector/inpage-listener-factory.js +4 -4
  43. package/dist/esm/naylence/fame/connector/inpage-listener.js +5 -2
  44. package/dist/esm/naylence/fame/delivery/default-delivery-tracker.js +4 -62
  45. package/dist/esm/naylence/fame/fabric/fabric-registry.js +37 -0
  46. package/dist/esm/naylence/fame/fabric/in-process-fame-fabric.js +3 -0
  47. package/dist/esm/naylence/fame/fabric/index.js +1 -0
  48. package/dist/esm/naylence/fame/grants/broadcast-channel-connection-grant.js +6 -3
  49. package/dist/esm/naylence/fame/grants/inpage-connection-grant.js +4 -2
  50. package/dist/esm/naylence/fame/http/oauth2-token-router.js +9 -9
  51. package/dist/esm/naylence/fame/node/admission/default-node-attach-client.js +34 -5
  52. package/dist/esm/naylence/fame/node/upstream-session-manager.js +40 -8
  53. package/dist/esm/naylence/fame/security/auth/oauth2-pkce-token-provider-factory.js +10 -6
  54. package/dist/esm/naylence/fame/security/auth/oauth2-pkce-token-provider.js +1 -2
  55. package/dist/esm/naylence/fame/security/default-security-manager.js +2 -1
  56. package/dist/esm/naylence/fame/security/index.js +1 -1
  57. package/dist/esm/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +3 -3
  58. package/dist/esm/naylence/fame/security/trust-store/trust-store-provider-factory.js +3 -3
  59. package/dist/esm/naylence/fame/util/index.js +1 -0
  60. package/dist/esm/node.js +2 -1
  61. package/dist/esm/runtime-isomorphic.js +2 -0
  62. package/dist/esm/version.js +2 -2
  63. package/dist/node/index.cjs +259 -171
  64. package/dist/node/index.mjs +258 -172
  65. package/dist/node/node.cjs +225 -136
  66. package/dist/node/node.mjs +223 -137
  67. package/dist/types/browser.d.ts +2 -2
  68. package/dist/types/naylence/fame/connector/broadcast-channel-connector-factory.d.ts +1 -0
  69. package/dist/types/naylence/fame/connector/index.d.ts +3 -3
  70. package/dist/types/naylence/fame/delivery/default-delivery-tracker.d.ts +0 -6
  71. package/dist/types/naylence/fame/fabric/fabric-registry.d.ts +29 -0
  72. package/dist/types/naylence/fame/fabric/index.d.ts +1 -0
  73. package/dist/types/naylence/fame/node/admission/default-node-attach-client.d.ts +1 -0
  74. package/dist/types/naylence/fame/security/index.d.ts +1 -1
  75. package/dist/types/naylence/fame/security/trust-store/noop-trust-store-provider-factory.d.ts +3 -3
  76. package/dist/types/naylence/fame/security/trust-store/trust-store-provider-factory.d.ts +4 -4
  77. package/dist/types/naylence/fame/security/trust-store/trust-store-provider.d.ts +5 -5
  78. package/dist/types/naylence/fame/util/index.d.ts +1 -0
  79. package/dist/types/node.d.ts +2 -1
  80. package/dist/types/runtime-isomorphic.d.ts +1 -0
  81. package/dist/types/version.d.ts +1 -1
  82. package/package.json +1 -1
@@ -28,7 +28,9 @@ function installProcessEnvShim() {
28
28
  if (g.__ENV__ && typeof g.__ENV__ === 'object')
29
29
  Object.assign(out, g.__ENV__);
30
30
  try {
31
- // @ts-ignore -- import.meta is only available in ESM builds
31
+ // import.meta is only available in ESM builds
32
+ // prettier-ignore
33
+ // @ts-ignore
32
34
  const ie = (typeof import.meta !== 'undefined' && import.meta.env) || undefined;
33
35
  if (ie && typeof ie === 'object')
34
36
  Object.assign(out, ie);
@@ -96,12 +98,12 @@ installProcessEnvShim();
96
98
  // --- END ENV SHIM ---
97
99
 
98
100
  // This file is auto-generated during build - do not edit manually
99
- // Generated from package.json version: 0.3.6
101
+ // Generated from package.json version: 0.3.9
100
102
  /**
101
103
  * The package version, injected at build time.
102
104
  * @internal
103
105
  */
104
- const VERSION = '0.3.6';
106
+ const VERSION = '0.3.9';
105
107
 
106
108
  /**
107
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -2330,6 +2332,50 @@ function validateKeyCorrelationTtlSec(ttlSec) {
2330
2332
  });
2331
2333
  }
2332
2334
 
2335
+ function isModuleNotFoundError(error) {
2336
+ if (!(error instanceof Error)) {
2337
+ return false;
2338
+ }
2339
+ const message = error.message || '';
2340
+ if (message.includes('Cannot find module') ||
2341
+ message.includes('ERR_MODULE_NOT_FOUND') ||
2342
+ message.includes('MODULE_NOT_FOUND')) {
2343
+ return true;
2344
+ }
2345
+ const code = error.code;
2346
+ if (typeof code === 'string') {
2347
+ return code === 'MODULE_NOT_FOUND' || code === 'ERR_MODULE_NOT_FOUND';
2348
+ }
2349
+ return false;
2350
+ }
2351
+ /**
2352
+ * Wraps a dynamic import loader and enriches "module not found" failures with an actionable error message.
2353
+ */
2354
+ async function safeImport(loader, dependencyNameOrOptions, maybeOptions) {
2355
+ const options = typeof dependencyNameOrOptions === 'string'
2356
+ ? { dependencyName: dependencyNameOrOptions, ...(maybeOptions ?? {}) }
2357
+ : dependencyNameOrOptions;
2358
+ const dependencyName = options.dependencyName;
2359
+ try {
2360
+ return await loader();
2361
+ }
2362
+ catch (error) {
2363
+ if (isModuleNotFoundError(error)) {
2364
+ const message = options.helpMessage ??
2365
+ `Missing optional dependency "${dependencyName}". Install it to enable this feature.`;
2366
+ const enrichedError = new Error(message);
2367
+ try {
2368
+ enrichedError.cause = error;
2369
+ }
2370
+ catch {
2371
+ // Ignore environments that do not support attaching a cause.
2372
+ }
2373
+ throw enrichedError;
2374
+ }
2375
+ throw error;
2376
+ }
2377
+ }
2378
+
2333
2379
  /**
2334
2380
  * flow_controller.ts - credit window management with cooperative back-pressure.
2335
2381
  *
@@ -3534,50 +3580,6 @@ function normalizeSecretSource(value) {
3534
3580
  return SecretSource.normalize(value);
3535
3581
  }
3536
3582
 
3537
- function isModuleNotFoundError(error) {
3538
- if (!(error instanceof Error)) {
3539
- return false;
3540
- }
3541
- const message = error.message || '';
3542
- if (message.includes('Cannot find module') ||
3543
- message.includes('ERR_MODULE_NOT_FOUND') ||
3544
- message.includes('MODULE_NOT_FOUND')) {
3545
- return true;
3546
- }
3547
- const code = error.code;
3548
- if (typeof code === 'string') {
3549
- return code === 'MODULE_NOT_FOUND' || code === 'ERR_MODULE_NOT_FOUND';
3550
- }
3551
- return false;
3552
- }
3553
- /**
3554
- * Wraps a dynamic import loader and enriches "module not found" failures with an actionable error message.
3555
- */
3556
- async function safeImport(loader, dependencyNameOrOptions, maybeOptions) {
3557
- const options = typeof dependencyNameOrOptions === 'string'
3558
- ? { dependencyName: dependencyNameOrOptions, ...(maybeOptions ?? {}) }
3559
- : dependencyNameOrOptions;
3560
- const dependencyName = options.dependencyName;
3561
- try {
3562
- return await loader();
3563
- }
3564
- catch (error) {
3565
- if (isModuleNotFoundError(error)) {
3566
- const message = options.helpMessage ??
3567
- `Missing optional dependency "${dependencyName}". Install it to enable this feature.`;
3568
- const enrichedError = new Error(message);
3569
- try {
3570
- enrichedError.cause = error;
3571
- }
3572
- catch {
3573
- // Ignore environments that do not support attaching a cause.
3574
- }
3575
- throw enrichedError;
3576
- }
3577
- throw error;
3578
- }
3579
- }
3580
-
3581
3583
  const indexedDBConfigSchema = z
3582
3584
  .object({
3583
3585
  type: z
@@ -7173,9 +7175,6 @@ class DefaultDeliveryTracker extends TaskSpawner {
7173
7175
  this.ackDoneSince = new Map();
7174
7176
  this.replyDoneSince = new Map();
7175
7177
  this.pendingAckDispatches = new Set();
7176
- this.recentlyHandled = new Map();
7177
- this.recentlyHandledOrder = [];
7178
- this.recentlyHandledTtlMs = 60000;
7179
7178
  this.isPreparingToStop = false;
7180
7179
  this.shutdownRequestedAtMs = null;
7181
7180
  this.shutdownRetryGraceMs = 1000;
@@ -7397,22 +7396,6 @@ class DefaultDeliveryTracker extends TaskSpawner {
7397
7396
  }
7398
7397
  }
7399
7398
  else {
7400
- const wasRecentlyHandled = await this.lock.runExclusive(async () => this.wasRecentlyHandled(envelope.id));
7401
- if (wasRecentlyHandled) {
7402
- logger$12.debug('tracker_duplicate_envelope_recently_handled', {
7403
- envp_id: envelope.id,
7404
- });
7405
- return new TrackedEnvelope({
7406
- timeoutAtMs: 0,
7407
- overallTimeoutAtMs: 0,
7408
- expectedResponseType: envelope.rtype ?? FameResponseType.NONE,
7409
- createdAtMs: Date.now(),
7410
- status: EnvelopeStatus.HANDLED,
7411
- mailboxType: MailboxType.INBOX,
7412
- originalEnvelope: envelope,
7413
- serviceName: inboxName,
7414
- });
7415
- }
7416
7399
  tracked = new TrackedEnvelope({
7417
7400
  timeoutAtMs: 0,
7418
7401
  overallTimeoutAtMs: 0,
@@ -7434,12 +7417,8 @@ class DefaultDeliveryTracker extends TaskSpawner {
7434
7417
  async onEnvelopeHandled(envelope) {
7435
7418
  const inbox = this.ensureInbox();
7436
7419
  envelope.status = EnvelopeStatus.HANDLED;
7420
+ // Delete the envelope from inbox to prevent growth
7437
7421
  await inbox.delete(envelope.originalEnvelope.id);
7438
- await this.lock.runExclusive(async () => {
7439
- this.markRecentlyHandled(envelope.originalEnvelope.id);
7440
- });
7441
- // Preserve handled envelope to prevent duplicate redelivery during shutdown drains.
7442
- // await inbox.set(envelope.originalEnvelope.id, envelope);
7443
7422
  }
7444
7423
  async onEnvelopeHandleFailed(inboxName, envelope, context, error, isFinalFailure = false) {
7445
7424
  const inbox = this.ensureInbox();
@@ -7654,9 +7633,9 @@ class DefaultDeliveryTracker extends TaskSpawner {
7654
7633
  });
7655
7634
  await this.markDoneSince(this.replyFutures, trackedEnvelope.originalEnvelope.id, this.replyDoneSince);
7656
7635
  await this.markDoneSince(this.ackFutures, trackedEnvelope.originalEnvelope.id, this.ackDoneSince);
7657
- if (envelope.rtype && Boolean(envelope.rtype & FameResponseType.ACK)) {
7658
- await this.sendAck(envelope);
7659
- }
7636
+ // Note: ACK is already sent in onCorrelatedMessage (lines 655-657)
7637
+ // when the reply envelope is first delivered. No need to send it again here.
7638
+ // Removing this duplicate sendAck call fixes the duplicate DeliveryAck bug.
7660
7639
  for (const handler of this.eventHandlers) {
7661
7640
  await handler.onEnvelopeReplied?.(trackedEnvelope, envelope);
7662
7641
  }
@@ -7806,8 +7785,6 @@ class DefaultDeliveryTracker extends TaskSpawner {
7806
7785
  }
7807
7786
  this.streamDone.clear();
7808
7787
  this.correlationToEnvelope.clear();
7809
- this.recentlyHandled.clear();
7810
- this.recentlyHandledOrder.length = 0;
7811
7788
  return values;
7812
7789
  });
7813
7790
  for (const timer of timers) {
@@ -8389,39 +8366,6 @@ class DefaultDeliveryTracker extends TaskSpawner {
8389
8366
  this.pendingAckDispatches.delete(ackDispatch);
8390
8367
  }
8391
8368
  }
8392
- markRecentlyHandled(envelopeId) {
8393
- const now = Date.now();
8394
- this.recentlyHandled.set(envelopeId, now);
8395
- this.recentlyHandledOrder.push(envelopeId);
8396
- this.trimRecentlyHandled(now);
8397
- }
8398
- wasRecentlyHandled(envelopeId) {
8399
- const now = Date.now();
8400
- const timestamp = this.recentlyHandled.get(envelopeId);
8401
- if (timestamp === undefined) {
8402
- return false;
8403
- }
8404
- if (now - timestamp > this.recentlyHandledTtlMs) {
8405
- this.recentlyHandled.delete(envelopeId);
8406
- return false;
8407
- }
8408
- return true;
8409
- }
8410
- trimRecentlyHandled(now) {
8411
- while (this.recentlyHandledOrder.length > 0) {
8412
- const candidate = this.recentlyHandledOrder[0];
8413
- const timestamp = this.recentlyHandled.get(candidate);
8414
- if (timestamp === undefined) {
8415
- this.recentlyHandledOrder.shift();
8416
- continue;
8417
- }
8418
- if (now - timestamp <= this.recentlyHandledTtlMs) {
8419
- break;
8420
- }
8421
- this.recentlyHandled.delete(candidate);
8422
- this.recentlyHandledOrder.shift();
8423
- }
8424
- }
8425
8369
  getShutdownRetryDeferDelay(nowMs) {
8426
8370
  if (!this.isPreparingToStop || this.shutdownRequestedAtMs === null) {
8427
8371
  return null;
@@ -9915,7 +9859,8 @@ const ensureBroadcastEnvironment = () => {
9915
9859
  };
9916
9860
  let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAsyncConnector {
9917
9861
  static generateConnectorId() {
9918
- const globalCrypto = globalThis.crypto;
9862
+ const globalCrypto = globalThis
9863
+ .crypto;
9919
9864
  if (globalCrypto?.randomUUID) {
9920
9865
  return globalCrypto.randomUUID();
9921
9866
  }
@@ -9970,7 +9915,8 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9970
9915
  this.listenerRegistered = false;
9971
9916
  this.visibilityChangeListenerRegistered = false;
9972
9917
  this.channelName =
9973
- typeof config.channelName === 'string' && config.channelName.trim().length > 0
9918
+ typeof config.channelName === 'string' &&
9919
+ config.channelName.trim().length > 0
9974
9920
  ? config.channelName.trim()
9975
9921
  : DEFAULT_CHANNEL$7;
9976
9922
  const preferredCapacity = typeof config.inboxCapacity === 'number' &&
@@ -9994,6 +9940,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9994
9940
  local_node_id: this.localNodeId,
9995
9941
  target_node_id: this.targetNodeId ?? null,
9996
9942
  inbox_capacity: preferredCapacity,
9943
+ passive: config.passive ?? false,
9997
9944
  timestamp: new Date().toISOString(),
9998
9945
  });
9999
9946
  this.onMsg = (event) => {
@@ -10011,7 +9958,8 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
10011
9958
  channel: this.channelName,
10012
9959
  connector_id: this.connectorId,
10013
9960
  message_type: message && typeof message === 'object'
10014
- ? message.constructor?.name ?? typeof message
9961
+ ? (message.constructor
9962
+ ?.name ?? typeof message)
10015
9963
  : typeof message,
10016
9964
  has_sender_id: Boolean(message?.senderId),
10017
9965
  has_sender_node_id: Boolean(message?.senderNodeId),
@@ -10241,7 +10189,9 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
10241
10189
  timestamp: new Date().toISOString(),
10242
10190
  });
10243
10191
  }
10244
- if (this.visibilityChangeListenerRegistered && this.visibilityChangeHandler && typeof document !== 'undefined') {
10192
+ if (this.visibilityChangeListenerRegistered &&
10193
+ this.visibilityChangeHandler &&
10194
+ typeof document !== 'undefined') {
10245
10195
  document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
10246
10196
  this.visibilityChangeListenerRegistered = false;
10247
10197
  this.visibilityChangeHandler = undefined;
@@ -10269,7 +10219,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
10269
10219
  return rawOrEnvelope;
10270
10220
  }
10271
10221
  _isWildcardTarget() {
10272
- return this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined';
10222
+ return (this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined');
10273
10223
  }
10274
10224
  _shouldAcceptMessageFromBus(senderNodeId, targetNodeId) {
10275
10225
  if (this._isWildcardTarget()) {
@@ -10289,7 +10239,9 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
10289
10239
  return true;
10290
10240
  }
10291
10241
  const expectedSender = this.targetNodeId;
10292
- if (expectedSender && expectedSender !== '*' && senderNodeId !== expectedSender) {
10242
+ if (expectedSender &&
10243
+ expectedSender !== '*' &&
10244
+ senderNodeId !== expectedSender) {
10293
10245
  logger$_.debug('broadcast_channel_message_rejected', {
10294
10246
  channel: this.channelName,
10295
10247
  connector_id: this.connectorId,
@@ -10508,14 +10460,16 @@ function normalizeBroadcastChannelConnectionGrant(candidate) {
10508
10460
  type,
10509
10461
  purpose,
10510
10462
  };
10511
- const channelValue = candidate.channelName ?? candidate['channel_name'];
10463
+ const channelValue = candidate.channelName ??
10464
+ candidate['channel_name'];
10512
10465
  if (channelValue !== undefined) {
10513
10466
  if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
10514
10467
  throw new TypeError('BroadcastChannelConnectionGrant "channelName" must be a non-empty string when provided');
10515
10468
  }
10516
10469
  result.channelName = channelValue.trim();
10517
10470
  }
10518
- const inboxValue = candidate.inboxCapacity ?? candidate['inbox_capacity'];
10471
+ const inboxValue = candidate.inboxCapacity ??
10472
+ candidate['inbox_capacity'];
10519
10473
  if (inboxValue !== undefined) {
10520
10474
  if (typeof inboxValue !== 'number' ||
10521
10475
  !Number.isFinite(inboxValue) ||
@@ -10524,7 +10478,8 @@ function normalizeBroadcastChannelConnectionGrant(candidate) {
10524
10478
  }
10525
10479
  result.inboxCapacity = Math.floor(inboxValue);
10526
10480
  }
10527
- const windowValue = candidate.initialWindow ?? candidate['initial_window'];
10481
+ const windowValue = candidate.initialWindow ??
10482
+ candidate['initial_window'];
10528
10483
  if (windowValue !== undefined) {
10529
10484
  if (typeof windowValue !== 'number' ||
10530
10485
  !Number.isFinite(windowValue) ||
@@ -10861,25 +10816,56 @@ class UpstreamSessionManager extends TaskSpawner {
10861
10816
  await connector.start(this.wrappedHandler);
10862
10817
  this.connector = connector;
10863
10818
  const callbackGrants = this.node.gatherSupportedCallbackGrants();
10819
+ logger$Z.debug('callback_grants_before_augmentation', {
10820
+ count: callbackGrants.length,
10821
+ types: callbackGrants.map((g) => g.type),
10822
+ });
10823
+ // Check if we should create a broadcast callback grant before processing connection grants
10824
+ // This prevents adding duplicate broadcast grants
10825
+ const shouldAddBroadcastGrant = this.shouldAdvertiseBroadcastGrant(grant, callbackGrants);
10826
+ const broadcastCallbackGrant = shouldAddBroadcastGrant
10827
+ ? this.createBroadcastCallbackGrant(grant)
10828
+ : null;
10829
+ logger$Z.debug('broadcast_callback_grant_check', {
10830
+ should_add: shouldAddBroadcastGrant,
10831
+ grant_created: !!broadcastCallbackGrant,
10832
+ });
10864
10833
  // Include admission client's connection grants as callback grants
10865
10834
  // This ensures DirectAdmissionClient grants are available for grant selection
10866
- if (welcome.frame.connectionGrants && Array.isArray(welcome.frame.connectionGrants)) {
10835
+ if (welcome.frame.connectionGrants &&
10836
+ Array.isArray(welcome.frame.connectionGrants)) {
10867
10837
  for (const grant of welcome.frame.connectionGrants) {
10868
10838
  if (grant && typeof grant === 'object') {
10869
10839
  // Avoid duplicates by checking if grant already exists
10870
- const isDuplicate = callbackGrants.some(existing => JSON.stringify(existing) === JSON.stringify(grant));
10840
+ const isDuplicate = callbackGrants.some((existing) => JSON.stringify(existing) === JSON.stringify(grant));
10871
10841
  if (!isDuplicate) {
10872
10842
  callbackGrants.push(grant);
10843
+ logger$Z.debug('added_connection_grant_as_callback', {
10844
+ type: grant.type,
10845
+ });
10846
+ }
10847
+ else {
10848
+ logger$Z.debug('skipped_duplicate_connection_grant', {
10849
+ type: grant.type,
10850
+ });
10873
10851
  }
10874
10852
  }
10875
10853
  }
10876
10854
  }
10877
- if (this.shouldAdvertiseBroadcastGrant(grant, callbackGrants)) {
10878
- const augmented = this.createBroadcastCallbackGrant(grant);
10879
- if (augmented) {
10880
- callbackGrants.push(augmented);
10881
- }
10855
+ // Add broadcast grant after connection grants to ensure we don't duplicate
10856
+ // any broadcast grants that may have been in connectionGrants
10857
+ if (broadcastCallbackGrant &&
10858
+ this.shouldAdvertiseBroadcastGrant(grant, callbackGrants)) {
10859
+ callbackGrants.push(broadcastCallbackGrant);
10860
+ logger$Z.debug('added_broadcast_callback_grant');
10861
+ }
10862
+ else if (broadcastCallbackGrant) {
10863
+ logger$Z.debug('skipped_duplicate_broadcast_callback_grant');
10882
10864
  }
10865
+ logger$Z.debug('callback_grants_after_augmentation', {
10866
+ count: callbackGrants.length,
10867
+ types: callbackGrants.map((g) => g.type),
10868
+ });
10883
10869
  const attachInfo = await this.attachClient.attach(this.node, this.outboundOriginType, connector, welcome.frame, this.wrappedHandler, this.getKeys() ?? undefined, callbackGrants);
10884
10870
  this.targetSystemId = attachInfo.targetSystemId ?? null;
10885
10871
  if (this.targetSystemId) {
@@ -11120,7 +11106,8 @@ class UpstreamSessionManager extends TaskSpawner {
11120
11106
  continue;
11121
11107
  }
11122
11108
  // Reset ack time if just resumed from pause (prevents immediate timeout)
11123
- if (previousState === ConnectorState.PAUSED && currentState === ConnectorState.STARTED) {
11109
+ if (previousState === ConnectorState.PAUSED &&
11110
+ currentState === ConnectorState.STARTED) {
11124
11111
  logger$Z.debug('connector_just_resumed_resetting_ack_time', {
11125
11112
  previous_state: previousState,
11126
11113
  current_state: currentState,
@@ -12677,15 +12664,30 @@ class DefaultNodeAttachClient {
12677
12664
  constructor(options = {}) {
12678
12665
  this.buffer = [];
12679
12666
  this.inHandshake = false;
12667
+ this.expectedSystemId = null;
12680
12668
  this.timeoutMs = options.timeoutMs ?? 10000;
12681
12669
  this.attachmentKeyValidator = options.attachmentKeyValidator;
12682
12670
  this.replicaStickinessManager = options.replicaStickinessManager ?? null;
12683
12671
  }
12684
12672
  async attach(node, originType, connector, welcomeFrame, finalHandler, keys, callbackGrants) {
12685
12673
  this.inHandshake = true;
12674
+ this.expectedSystemId = welcomeFrame.systemId;
12686
12675
  const interimHandler = async (envelope, context) => {
12687
12676
  if (this.inHandshake) {
12688
- this.buffer.push(envelope);
12677
+ // Filter: only buffer frames related to our systemId or frames without systemId info
12678
+ const frameSystemId = envelope.frame
12679
+ ?.systemId;
12680
+ if (!frameSystemId || frameSystemId === this.expectedSystemId) {
12681
+ this.buffer.push(envelope);
12682
+ }
12683
+ else {
12684
+ // Silently ignore frames from other agents during concurrent handshakes
12685
+ logger$W.debug('handshake_ignoring_frame_from_different_system', {
12686
+ frame_type: envelope.frame.type,
12687
+ frame_system_id: frameSystemId,
12688
+ expected_system_id: this.expectedSystemId,
12689
+ });
12690
+ }
12689
12691
  return null;
12690
12692
  }
12691
12693
  return finalHandler(envelope, context);
@@ -12812,6 +12814,7 @@ class DefaultNodeAttachClient {
12812
12814
  parent_id: ackFrame.targetSystemId,
12813
12815
  });
12814
12816
  this.inHandshake = false;
12817
+ this.expectedSystemId = null;
12815
12818
  await connector.replaceHandler(finalHandler);
12816
12819
  while (this.buffer.length > 0) {
12817
12820
  const bufferedEnvelope = this.buffer.shift();
@@ -12869,7 +12872,8 @@ class DefaultNodeAttachClient {
12869
12872
  const deadline = Date.now() + this.timeoutMs;
12870
12873
  while (Date.now() < deadline) {
12871
12874
  // Allow both STARTED and PAUSED states (PAUSED = tab hidden but connection alive)
12872
- if (connector.state !== ConnectorState.STARTED && connector.state !== ConnectorState.PAUSED) {
12875
+ if (connector.state !== ConnectorState.STARTED &&
12876
+ connector.state !== ConnectorState.PAUSED) {
12873
12877
  let errorMessage = 'Connector closed while waiting for NodeAttachAck';
12874
12878
  if (connector.closeCode !== undefined) {
12875
12879
  errorMessage += ` (code=${connector.closeCode}`;
@@ -12888,9 +12892,21 @@ class DefaultNodeAttachClient {
12888
12892
  if (envelope.frame.type === 'NodeAttachAck') {
12889
12893
  return envelope;
12890
12894
  }
12891
- logger$W.error('unexpected_frame_during_handshake', {
12892
- frame_type: envelope.frame.type,
12893
- });
12895
+ // NodeAttach frames during handshake are expected in multi-agent scenarios
12896
+ // where multiple agents attach concurrently to the same channel
12897
+ if (envelope.frame.type === 'NodeAttach') {
12898
+ logger$W.debug('handshake_ignoring_concurrent_attach', {
12899
+ frame_type: envelope.frame.type,
12900
+ frame_system_id: envelope.frame?.systemId ??
12901
+ 'unknown',
12902
+ });
12903
+ }
12904
+ else {
12905
+ // Other unexpected frames are still logged as errors
12906
+ logger$W.error('unexpected_frame_during_handshake', {
12907
+ frame_type: envelope.frame.type,
12908
+ });
12909
+ }
12894
12910
  }
12895
12911
  await delay(HANDSHAKE_POLL_INTERVAL_MS);
12896
12912
  }
@@ -13609,7 +13625,8 @@ function createFsShim() {
13609
13625
  else if (options &&
13610
13626
  typeof options === 'object' &&
13611
13627
  'encoding' in options &&
13612
- typeof options.encoding === 'string') {
13628
+ typeof options.encoding ===
13629
+ 'string') {
13613
13630
  encoding = options.encoding;
13614
13631
  }
13615
13632
  const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
@@ -20542,7 +20559,8 @@ class InPageConnector extends BaseAsyncConnector {
20542
20559
  this.listenerRegistered = false;
20543
20560
  this.visibilityChangeListenerRegistered = false;
20544
20561
  this.channelName =
20545
- typeof config.channelName === 'string' && config.channelName.trim().length > 0
20562
+ typeof config.channelName === 'string' &&
20563
+ config.channelName.trim().length > 0
20546
20564
  ? config.channelName.trim()
20547
20565
  : DEFAULT_CHANNEL$6;
20548
20566
  const preferredCapacity = typeof config.inboxCapacity === 'number' &&
@@ -20581,7 +20599,8 @@ class InPageConnector extends BaseAsyncConnector {
20581
20599
  channel: this.channelName,
20582
20600
  connector_id: this.connectorId,
20583
20601
  message_type: message && typeof message === 'object'
20584
- ? message.constructor?.name ?? typeof message
20602
+ ? (message.constructor
20603
+ ?.name ?? typeof message)
20585
20604
  : typeof message,
20586
20605
  has_sender_id: Boolean(message?.senderId),
20587
20606
  has_sender_node_id: Boolean(message?.senderNodeId),
@@ -20590,7 +20609,8 @@ class InPageConnector extends BaseAsyncConnector {
20590
20609
  return;
20591
20610
  }
20592
20611
  const busMessage = message;
20593
- const senderId = typeof busMessage.senderId === 'string' && busMessage.senderId.length > 0
20612
+ const senderId = typeof busMessage.senderId === 'string' &&
20613
+ busMessage.senderId.length > 0
20594
20614
  ? busMessage.senderId
20595
20615
  : null;
20596
20616
  const senderNodeId = InPageConnector.normalizeNodeId(busMessage.senderNodeId);
@@ -20841,7 +20861,9 @@ class InPageConnector extends BaseAsyncConnector {
20841
20861
  timestamp: new Date().toISOString(),
20842
20862
  });
20843
20863
  }
20844
- if (this.visibilityChangeListenerRegistered && this.visibilityChangeHandler && typeof document !== 'undefined') {
20864
+ if (this.visibilityChangeListenerRegistered &&
20865
+ this.visibilityChangeHandler &&
20866
+ typeof document !== 'undefined') {
20845
20867
  document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
20846
20868
  this.visibilityChangeListenerRegistered = false;
20847
20869
  this.visibilityChangeHandler = undefined;
@@ -20858,7 +20880,7 @@ class InPageConnector extends BaseAsyncConnector {
20858
20880
  return rawOrEnvelope;
20859
20881
  }
20860
20882
  _isWildcardTarget() {
20861
- return this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined';
20883
+ return (this.targetNodeId === '*' || typeof this.targetNodeId === 'undefined');
20862
20884
  }
20863
20885
  _shouldAcceptMessageFromBus(senderNodeId, targetNodeId) {
20864
20886
  if (this._isWildcardTarget()) {
@@ -20878,7 +20900,9 @@ class InPageConnector extends BaseAsyncConnector {
20878
20900
  return true;
20879
20901
  }
20880
20902
  const expectedSender = this.targetNodeId;
20881
- if (expectedSender && expectedSender !== '*' && senderNodeId !== expectedSender) {
20903
+ if (expectedSender &&
20904
+ expectedSender !== '*' &&
20905
+ senderNodeId !== expectedSender) {
20882
20906
  logger$G.debug('inpage_message_rejected', {
20883
20907
  channel: this.channelName,
20884
20908
  connector_id: this.connectorId,
@@ -21298,8 +21322,8 @@ class CertificateManagerFactory extends AbstractResourceFactory {
21298
21322
  }
21299
21323
  }
21300
21324
 
21301
- const DEFAULT_UNCONFIGURED_MESSAGE = "Trust store is not configured. Set FAME_CA_CERTS to a PEM value, a file path, a data URI, or an HTTPS bundle URL.";
21302
- const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE = "TrustStoreProviderFactory";
21325
+ const DEFAULT_UNCONFIGURED_MESSAGE = 'Trust store is not configured. Set FAME_CA_CERTS to a PEM value, a file path, a data URI, or an HTTPS bundle URL.';
21326
+ const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE = 'TrustStoreProviderFactory';
21303
21327
  class TrustStoreProviderFactory extends AbstractResourceFactory {
21304
21328
  createUnconfiguredProvider(reason) {
21305
21329
  return new NoopTrustStoreProvider(reason ?? DEFAULT_UNCONFIGURED_MESSAGE);
@@ -25027,7 +25051,8 @@ class DefaultSecurityManager {
25027
25051
  const hasSignature = Boolean(envelope.sec?.sig);
25028
25052
  if (!hasSignature) {
25029
25053
  const nodeSid = node.sid;
25030
- const envelopeSid = envelope.sid;
25054
+ const envelopeSid = envelope
25055
+ .sid;
25031
25056
  const isLocalUnsignedSelfEnvelope = localContext.originType === DeliveryOriginType.LOCAL &&
25032
25057
  typeof nodeSid === 'string' &&
25033
25058
  nodeSid.length > 0 &&
@@ -28307,14 +28332,16 @@ function normalizeInPageConnectionGrant(candidate) {
28307
28332
  type,
28308
28333
  purpose,
28309
28334
  };
28310
- const channelValue = candidate.channelName ?? candidate['channel_name'];
28335
+ const channelValue = candidate.channelName ??
28336
+ candidate['channel_name'];
28311
28337
  if (channelValue !== undefined) {
28312
28338
  if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
28313
28339
  throw new TypeError('InPageConnectionGrant "channelName" must be a non-empty string when provided');
28314
28340
  }
28315
28341
  result.channelName = channelValue.trim();
28316
28342
  }
28317
- const inboxValue = candidate.inboxCapacity ?? candidate['inbox_capacity'];
28343
+ const inboxValue = candidate.inboxCapacity ??
28344
+ candidate['inbox_capacity'];
28318
28345
  if (inboxValue !== undefined) {
28319
28346
  if (typeof inboxValue !== 'number' ||
28320
28347
  !Number.isFinite(inboxValue) ||
@@ -28830,6 +28857,44 @@ function normalizeRouterOptions(options) {
28830
28857
  return { welcomeService, prefix };
28831
28858
  }
28832
28859
 
28860
+ /**
28861
+ * Fabric Registry
28862
+ *
28863
+ * Provides a mapping from nodes to their associated fabrics.
28864
+ * This allows agents to retrieve the fabric they were registered on
28865
+ * without relying on the global fabric stack.
28866
+ */
28867
+ /**
28868
+ * WeakMap to store the node-to-fabric mapping.
28869
+ * Using WeakMap ensures that nodes can be garbage collected
28870
+ * when no longer referenced elsewhere.
28871
+ */
28872
+ const nodeToFabric = new WeakMap();
28873
+ /**
28874
+ * @internal
28875
+ * Associates a node with its fabric. This should only be called
28876
+ * by fabric implementations when they create or adopt a node.
28877
+ *
28878
+ * @param node - The node to associate
28879
+ * @param fabric - The fabric that owns the node
28880
+ */
28881
+ function _setFabricForNode(node, fabric) {
28882
+ nodeToFabric.set(node, fabric);
28883
+ }
28884
+ /**
28885
+ * Retrieves the fabric associated with a node.
28886
+ *
28887
+ * This is useful for agents that need to access the fabric they
28888
+ * were registered on, particularly in environments where multiple
28889
+ * fabrics exist (e.g., React with multiple FabricProviders).
28890
+ *
28891
+ * @param node - The node to look up
28892
+ * @returns The fabric associated with the node, or undefined if not found
28893
+ */
28894
+ function getFabricForNode(node) {
28895
+ return nodeToFabric.get(node);
28896
+ }
28897
+
28833
28898
  /**
28834
28899
  * Browser-friendly entry point for Naylence Runtime.
28835
28900
  *
@@ -28942,7 +29007,8 @@ class InPageConnectorFactory extends ConnectorFactory {
28942
29007
  const normalized = this._normalizeConfig(config);
28943
29008
  const options = (factoryArgs[0] ?? {});
28944
29009
  const normalizedLocalNodeFromConfig = this._normalizeNodeId(normalized.localNodeId);
28945
- const localNodeId = this._normalizeNodeId(options.localNodeId) ?? normalizedLocalNodeFromConfig;
29010
+ const localNodeId = this._normalizeNodeId(options.localNodeId) ??
29011
+ normalizedLocalNodeFromConfig;
28946
29012
  if (!localNodeId) {
28947
29013
  throw new Error('InPageConnectorFactory requires a localNodeId from config or create() options');
28948
29014
  }
@@ -29118,10 +29184,12 @@ class BroadcastChannelConnectorFactory extends ConnectorFactory {
29118
29184
  type: BROADCAST_CHANNEL_CONNECTOR_TYPE,
29119
29185
  };
29120
29186
  const channelCandidate = record.channelName ?? record['channel_name'];
29121
- if (typeof channelCandidate === 'string' && channelCandidate.trim().length > 0) {
29187
+ if (typeof channelCandidate === 'string' &&
29188
+ channelCandidate.trim().length > 0) {
29122
29189
  config.channelName = channelCandidate.trim();
29123
29190
  }
29124
- const inboxCandidate = record.inboxCapacity ?? record['inbox_capacity'];
29191
+ const inboxCandidate = record.inboxCapacity ??
29192
+ record['inbox_capacity'];
29125
29193
  if (typeof inboxCandidate === 'number' &&
29126
29194
  Number.isFinite(inboxCandidate) &&
29127
29195
  inboxCandidate > 0) {
@@ -29145,9 +29213,11 @@ class BroadcastChannelConnectorFactory extends ConnectorFactory {
29145
29213
  throw new Error('BroadcastChannelConnectorFactory requires a configuration');
29146
29214
  }
29147
29215
  const normalized = this._normalizeConfig(config);
29148
- const options = (factoryArgs[0] ?? {});
29216
+ const options = (factoryArgs[0] ??
29217
+ {});
29149
29218
  const normalizedLocalNodeFromConfig = this._normalizeNodeId(normalized.localNodeId);
29150
- const localNodeId = this._normalizeNodeId(options.localNodeId) ?? normalizedLocalNodeFromConfig;
29219
+ const localNodeId = this._normalizeNodeId(options.localNodeId) ??
29220
+ normalizedLocalNodeFromConfig;
29151
29221
  if (!localNodeId) {
29152
29222
  throw new Error('BroadcastChannelConnectorFactory requires a localNodeId from config or create() options');
29153
29223
  }
@@ -29172,6 +29242,7 @@ class BroadcastChannelConnectorFactory extends ConnectorFactory {
29172
29242
  inboxCapacity,
29173
29243
  localNodeId,
29174
29244
  initialTargetNodeId: resolvedTarget,
29245
+ passive: normalized.passive,
29175
29246
  };
29176
29247
  const connector = new BroadcastChannelConnector(connectorConfig, baseConfig);
29177
29248
  if (options.authorization) {
@@ -29210,6 +29281,9 @@ class BroadcastChannelConnectorFactory extends ConnectorFactory {
29210
29281
  if (normalizedLocalNodeId) {
29211
29282
  normalized.localNodeId = normalizedLocalNodeId;
29212
29283
  }
29284
+ if (typeof candidate.passive === 'boolean') {
29285
+ normalized.passive = candidate.passive;
29286
+ }
29213
29287
  if (typeof candidate.flowControl === 'boolean') {
29214
29288
  normalized.flowControl = candidate.flowControl;
29215
29289
  }
@@ -29635,7 +29709,9 @@ class InPageListener extends TransportListener {
29635
29709
  typeof channelCandidate === 'string' && channelCandidate.trim().length > 0
29636
29710
  ? channelCandidate.trim()
29637
29711
  : DEFAULT_CHANNEL$3;
29638
- const normalizedCapacity = typeof inboxCandidate === 'number' && Number.isFinite(inboxCandidate) && inboxCandidate > 0
29712
+ const normalizedCapacity = typeof inboxCandidate === 'number' &&
29713
+ Number.isFinite(inboxCandidate) &&
29714
+ inboxCandidate > 0
29639
29715
  ? Math.floor(inboxCandidate)
29640
29716
  : DEFAULT_INBOX_CAPACITY$3;
29641
29717
  this._inboxCapacity = normalizedCapacity;
@@ -29910,7 +29986,8 @@ class InPageListener extends TransportListener {
29910
29986
  if (grant.type === INPAGE_CONNECTION_GRANT_TYPE) {
29911
29987
  return inPageGrantToConnectorConfig(grant);
29912
29988
  }
29913
- if (typeof grant?.toConnectorConfig === 'function') {
29989
+ if (typeof grant
29990
+ ?.toConnectorConfig === 'function') {
29914
29991
  return grant.toConnectorConfig();
29915
29992
  }
29916
29993
  throw new Error(`Unsupported grant type: ${grant.type}`);
@@ -30064,7 +30141,9 @@ function normalizeConfig$r(config) {
30064
30141
  : DEFAULT_CHANNEL$2;
30065
30142
  const rawInbox = record.inboxCapacity ?? record['inbox_capacity'];
30066
30143
  let inboxCapacity = DEFAULT_INBOX_CAPACITY$2;
30067
- if (typeof rawInbox === 'number' && Number.isFinite(rawInbox) && rawInbox > 0) {
30144
+ if (typeof rawInbox === 'number' &&
30145
+ Number.isFinite(rawInbox) &&
30146
+ rawInbox > 0) {
30068
30147
  inboxCapacity = Math.floor(rawInbox);
30069
30148
  }
30070
30149
  else if (typeof rawInbox === 'string') {
@@ -30092,9 +30171,7 @@ class InPageListenerFactory extends TransportListenerFactory {
30092
30171
  }
30093
30172
  async create(config, ...factoryArgs) {
30094
30173
  const normalized = normalizeConfig$r(config);
30095
- const [{ InPageListener }] = await Promise.all([
30096
- getInPageListenerModule(),
30097
- ]);
30174
+ const [{ InPageListener }] = await Promise.all([getInPageListenerModule()]);
30098
30175
  return new InPageListener({
30099
30176
  channelName: normalized.channelName,
30100
30177
  inboxCapacity: normalized.inboxCapacity,
@@ -30112,9 +30189,7 @@ var inpageListenerFactory = /*#__PURE__*/Object.freeze({
30112
30189
  const logger$o = getLogger('naylence.fame.connector.broadcast_channel_listener');
30113
30190
  const DEFAULT_CHANNEL$1 = 'naylence-fabric';
30114
30191
  const DEFAULT_INBOX_CAPACITY$1 = 2048;
30115
- const RESPONSE_TYPE_MASK = FameResponseType.ACK |
30116
- FameResponseType.REPLY |
30117
- FameResponseType.STREAM;
30192
+ const RESPONSE_TYPE_MASK = FameResponseType.ACK | FameResponseType.REPLY | FameResponseType.STREAM;
30118
30193
  const isBrowserEnvironment$1 = () => typeof window !== 'undefined' &&
30119
30194
  typeof BroadcastChannel !== 'undefined' &&
30120
30195
  typeof MessageEvent !== 'undefined';
@@ -30328,9 +30403,7 @@ class BroadcastChannelListener extends TransportListener {
30328
30403
  return null;
30329
30404
  }
30330
30405
  })();
30331
- if (error instanceof ZodError &&
30332
- decoded &&
30333
- decoded.length > 0) {
30406
+ if (error instanceof ZodError && decoded && decoded.length > 0) {
30334
30407
  try {
30335
30408
  const reparsed = JSON.parse(decoded);
30336
30409
  const candidate = reparsed.rtype;
@@ -30553,11 +30626,19 @@ class BroadcastChannelListener extends TransportListener {
30553
30626
  ? Math.floor(initialWindowCandidate)
30554
30627
  : undefined;
30555
30628
  const initialTargetNodeId = this._normalizeNodeId(targetCandidate) ?? targetSystemId;
30629
+ const passive = typeof passiveCandidate === 'boolean' ? passiveCandidate : true;
30630
+ logger$o.debug('broadcast_channel_listener_building_connector_config', {
30631
+ system_id: systemId,
30632
+ channel_name: channelName,
30633
+ passive,
30634
+ has_base_config: !!baseConfig,
30635
+ passive_candidate: passiveCandidate,
30636
+ });
30556
30637
  return {
30557
30638
  type: BROADCAST_CHANNEL_CONNECTOR_TYPE,
30558
30639
  channelName,
30559
30640
  inboxCapacity,
30560
- passive: typeof passiveCandidate === 'boolean' ? passiveCandidate : true,
30641
+ passive,
30561
30642
  initialWindow,
30562
30643
  localNodeId,
30563
30644
  initialTargetNodeId,
@@ -30670,7 +30751,9 @@ function normalizeConfig$q(config) {
30670
30751
  : DEFAULT_CHANNEL;
30671
30752
  const rawInbox = record.inboxCapacity ?? record['inbox_capacity'];
30672
30753
  let inboxCapacity = DEFAULT_INBOX_CAPACITY;
30673
- if (typeof rawInbox === 'number' && Number.isFinite(rawInbox) && rawInbox > 0) {
30754
+ if (typeof rawInbox === 'number' &&
30755
+ Number.isFinite(rawInbox) &&
30756
+ rawInbox > 0) {
30674
30757
  inboxCapacity = Math.floor(rawInbox);
30675
30758
  }
30676
30759
  else if (typeof rawInbox === 'string') {
@@ -32019,6 +32102,8 @@ class InProcessFameFabric extends FameFabric {
32019
32102
  this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
32020
32103
  this._ownsNode = true;
32021
32104
  }
32105
+ // Register this fabric in the registry so agents can look it up
32106
+ _setFabricForNode(this._currentNode, this);
32022
32107
  if (this._ownsNode && !this._nodeStarted) {
32023
32108
  await this.getRequiredNode().start();
32024
32109
  this._nodeStarted = true;
@@ -34160,19 +34245,23 @@ function normalizeConfig$a(config) {
34160
34245
  normalized.clientSecretConfig = normalizeSecretSource(clientSecretSource);
34161
34246
  }
34162
34247
  const audienceCandidate = candidate.audience ?? candidate.aud;
34163
- if (typeof audienceCandidate === 'string' && audienceCandidate.trim().length > 0) {
34248
+ if (typeof audienceCandidate === 'string' &&
34249
+ audienceCandidate.trim().length > 0) {
34164
34250
  normalized.audience = audienceCandidate.trim();
34165
34251
  }
34166
34252
  const codeChallengeMethod = candidate.codeChallengeMethod ?? candidate.code_challenge_method;
34167
- if (typeof codeChallengeMethod === 'string' && codeChallengeMethod.trim().length > 0) {
34253
+ if (typeof codeChallengeMethod === 'string' &&
34254
+ codeChallengeMethod.trim().length > 0) {
34168
34255
  normalized.codeChallengeMethod = codeChallengeMethod.trim();
34169
34256
  }
34170
34257
  const codeVerifierLength = candidate.codeVerifierLength ?? candidate.code_verifier_length;
34171
- if (typeof codeVerifierLength === 'number' && Number.isFinite(codeVerifierLength)) {
34258
+ if (typeof codeVerifierLength === 'number' &&
34259
+ Number.isFinite(codeVerifierLength)) {
34172
34260
  normalized.codeVerifierLength = codeVerifierLength;
34173
34261
  }
34174
34262
  const clockSkewSeconds = candidate.clockSkewSeconds ?? candidate.clock_skew_seconds;
34175
- if (typeof clockSkewSeconds === 'number' && Number.isFinite(clockSkewSeconds)) {
34263
+ if (typeof clockSkewSeconds === 'number' &&
34264
+ Number.isFinite(clockSkewSeconds)) {
34176
34265
  normalized.clockSkewSeconds = clockSkewSeconds;
34177
34266
  }
34178
34267
  const loginHintParam = candidate.loginHintParam ?? candidate.login_hint_param;
@@ -34217,8 +34306,8 @@ class OAuth2PkceTokenProviderFactory extends TokenProviderFactory {
34217
34306
  options.audience = normalized.audience;
34218
34307
  }
34219
34308
  if (normalized.codeChallengeMethod) {
34220
- options.codeChallengeMethod = normalized.codeChallengeMethod
34221
- .toUpperCase();
34309
+ options.codeChallengeMethod =
34310
+ normalized.codeChallengeMethod.toUpperCase();
34222
34311
  }
34223
34312
  if (normalized.codeVerifierLength) {
34224
34313
  options.codeVerifierLength = normalized.codeVerifierLength;
@@ -35975,14 +36064,14 @@ var eddsaEnvelopeVerifierFactory = /*#__PURE__*/Object.freeze({
35975
36064
 
35976
36065
  const FACTORY_META$d = {
35977
36066
  base: TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE,
35978
- key: "NoopTrustStoreProvider",
36067
+ key: 'NoopTrustStoreProvider',
35979
36068
  isDefault: true,
35980
36069
  priority: 10,
35981
36070
  };
35982
36071
  class NoopTrustStoreProviderFactory extends TrustStoreProviderFactory {
35983
36072
  constructor() {
35984
36073
  super(...arguments);
35985
- this.type = "NoopTrustStoreProvider";
36074
+ this.type = 'NoopTrustStoreProvider';
35986
36075
  this.isDefault = true;
35987
36076
  this.priority = 10;
35988
36077
  }
@@ -39376,8 +39465,7 @@ function normalizeOptions$2(raw) {
39376
39465
  const scopes = normalizeScopes(camel.scopes) ??
39377
39466
  normalizeScopes(snake.scopes ?? snake.scope) ??
39378
39467
  DEFAULT_SCOPES.slice();
39379
- const audience = coerceString(camel.audience) ??
39380
- coerceString(snake.audience ?? snake.aud);
39468
+ const audience = coerceString(camel.audience) ?? coerceString(snake.audience ?? snake.aud);
39381
39469
  const fetchImpl = (camel.fetchImpl ?? snake.fetch_impl);
39382
39470
  const clockSkewSeconds = coerceNumber(camel.clockSkewSeconds) ??
39383
39471
  coerceNumber(snake.clock_skew_seconds) ??
@@ -40869,4 +40957,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
40869
40957
  WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
40870
40958
  });
40871
40959
 
40872
- export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$X as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$$ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$_ as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$Y as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
40960
+ export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$X as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$$ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$_ as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$Y as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFabricForNode, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, safeImport, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };