@naylence/runtime 0.4.0 → 0.4.2

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.
@@ -126,6 +126,7 @@ const MODULES = [
126
126
  "./node/node-identity-policy-profile-factory.js",
127
127
  "./node/token-subject-node-identity-policy-factory.js",
128
128
  "./placement/static-node-placement-strategy-factory.js",
129
+ "./security/auth/authorization-profile-factory.js",
129
130
  "./security/auth/bearer-token-header-auth-injection-strategy-factory.js",
130
131
  "./security/auth/default-authorizer-factory.js",
131
132
  "./security/auth/default-policy-authorizer-factory.js",
@@ -208,6 +209,7 @@ const MODULE_LOADERS = {
208
209
  "./node/node-identity-policy-profile-factory.js": () => Promise.resolve().then(function () { return nodeIdentityPolicyProfileFactory; }),
209
210
  "./node/token-subject-node-identity-policy-factory.js": () => Promise.resolve().then(function () { return tokenSubjectNodeIdentityPolicyFactory; }),
210
211
  "./placement/static-node-placement-strategy-factory.js": () => Promise.resolve().then(function () { return staticNodePlacementStrategyFactory; }),
212
+ "./security/auth/authorization-profile-factory.js": () => Promise.resolve().then(function () { return authorizationProfileFactory; }),
211
213
  "./security/auth/bearer-token-header-auth-injection-strategy-factory.js": () => Promise.resolve().then(function () { return bearerTokenHeaderAuthInjectionStrategyFactory; }),
212
214
  "./security/auth/default-authorizer-factory.js": () => Promise.resolve().then(function () { return defaultAuthorizerFactory; }),
213
215
  "./security/auth/default-policy-authorizer-factory.js": () => Promise.resolve().then(function () { return defaultPolicyAuthorizerFactory; }),
@@ -521,12 +523,12 @@ async function ensureRuntimeFactoriesRegistered(registry = Registry) {
521
523
  }
522
524
 
523
525
  // This file is auto-generated during build - do not edit manually
524
- // Generated from package.json version: 0.4.0
526
+ // Generated from package.json version: 0.4.2
525
527
  /**
526
528
  * The package version, injected at build time.
527
529
  * @internal
528
530
  */
529
- const VERSION = '0.4.0';
531
+ const VERSION = '0.4.2';
530
532
 
531
533
  let initialized = false;
532
534
  const runtimePlugin = {
@@ -3730,7 +3732,7 @@ class EnvCredentialProviderFactory extends CredentialProviderFactory {
3730
3732
  return new EnvCredentialProvider(resolved.varName);
3731
3733
  }
3732
3734
  }
3733
- const FACTORY_META$1f = {
3735
+ const FACTORY_META$1g = {
3734
3736
  base: CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE,
3735
3737
  key: 'EnvCredentialProvider',
3736
3738
  };
@@ -3738,7 +3740,7 @@ const FACTORY_META$1f = {
3738
3740
  var envCredentialProviderFactory = /*#__PURE__*/Object.freeze({
3739
3741
  __proto__: null,
3740
3742
  EnvCredentialProviderFactory: EnvCredentialProviderFactory,
3741
- FACTORY_META: FACTORY_META$1f,
3743
+ FACTORY_META: FACTORY_META$1g,
3742
3744
  default: EnvCredentialProviderFactory,
3743
3745
  normalizeEnvConfig: normalizeEnvConfig
3744
3746
  });
@@ -3836,14 +3838,14 @@ class PromptCredentialProviderFactory extends CredentialProviderFactory {
3836
3838
  return new PromptCredentialProvider(resolved.credentialName);
3837
3839
  }
3838
3840
  }
3839
- const FACTORY_META$1e = {
3841
+ const FACTORY_META$1f = {
3840
3842
  base: CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE,
3841
3843
  key: 'PromptCredentialProvider',
3842
3844
  };
3843
3845
 
3844
3846
  var promptCredentialProviderFactory = /*#__PURE__*/Object.freeze({
3845
3847
  __proto__: null,
3846
- FACTORY_META: FACTORY_META$1e,
3848
+ FACTORY_META: FACTORY_META$1f,
3847
3849
  PromptCredentialProviderFactory: PromptCredentialProviderFactory,
3848
3850
  default: PromptCredentialProviderFactory,
3849
3851
  normalizePromptConfig: normalizePromptConfig
@@ -3897,14 +3899,14 @@ class SecretStoreCredentialProviderFactory extends CredentialProviderFactory {
3897
3899
  return new SecretStoreCredentialProvider(resolved.secretName);
3898
3900
  }
3899
3901
  }
3900
- const FACTORY_META$1d = {
3902
+ const FACTORY_META$1e = {
3901
3903
  base: CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE,
3902
3904
  key: 'SecretStoreCredentialProvider',
3903
3905
  };
3904
3906
 
3905
3907
  var secretStoreCredentialProviderFactory = /*#__PURE__*/Object.freeze({
3906
3908
  __proto__: null,
3907
- FACTORY_META: FACTORY_META$1d,
3909
+ FACTORY_META: FACTORY_META$1e,
3908
3910
  SecretStoreCredentialProviderFactory: SecretStoreCredentialProviderFactory,
3909
3911
  default: SecretStoreCredentialProviderFactory,
3910
3912
  normalizeSecretStoreConfig: normalizeSecretStoreConfig
@@ -3953,14 +3955,14 @@ class StaticCredentialProviderFactory extends CredentialProviderFactory {
3953
3955
  return new StaticCredentialProvider(resolved.credentialValue);
3954
3956
  }
3955
3957
  }
3956
- const FACTORY_META$1c = {
3958
+ const FACTORY_META$1d = {
3957
3959
  base: CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE,
3958
3960
  key: 'StaticCredentialProvider',
3959
3961
  };
3960
3962
 
3961
3963
  var staticCredentialProviderFactory = /*#__PURE__*/Object.freeze({
3962
3964
  __proto__: null,
3963
- FACTORY_META: FACTORY_META$1c,
3965
+ FACTORY_META: FACTORY_META$1d,
3964
3966
  StaticCredentialProviderFactory: StaticCredentialProviderFactory,
3965
3967
  default: StaticCredentialProviderFactory,
3966
3968
  normalizeStaticConfig: normalizeStaticConfig
@@ -4204,7 +4206,7 @@ const BASE_PROFILE_MAP = {
4204
4206
  [PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
4205
4207
  };
4206
4208
  // Extended profile map - can be augmented by Node.js environment
4207
- const PROFILE_MAP$6 = {
4209
+ const PROFILE_MAP$7 = {
4208
4210
  ...BASE_PROFILE_MAP,
4209
4211
  };
4210
4212
  class StorageProfileFactory extends StorageProviderFactory {
@@ -4219,9 +4221,9 @@ class StorageProfileFactory extends StorageProviderFactory {
4219
4221
  type: 'StorageProfile',
4220
4222
  });
4221
4223
  const profileName = (parsed.profile ?? PROFILE_NAME_MEMORY).toLowerCase();
4222
- const profileConfig = PROFILE_MAP$6[profileName];
4224
+ const profileConfig = PROFILE_MAP$7[profileName];
4223
4225
  if (!profileConfig) {
4224
- throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${Object.keys(PROFILE_MAP$6).join(', ')}`);
4226
+ throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${Object.keys(PROFILE_MAP$7).join(', ')}`);
4225
4227
  }
4226
4228
  const createOptions = {
4227
4229
  ...options,
@@ -13249,44 +13251,12 @@ class ConnectionRetryPolicyFactory extends AbstractResourceFactory {
13249
13251
  }
13250
13252
  }
13251
13253
 
13252
- const TOKEN_PROVIDER_FACTORY_BASE_TYPE = 'TokenProviderFactory';
13253
- class TokenProviderFactory extends AbstractResourceFactory {
13254
- static async createTokenProvider(config, options = {}) {
13255
- if (config) {
13256
- const provider = await createResource$1(TOKEN_PROVIDER_FACTORY_BASE_TYPE, config, options);
13257
- if (!provider) {
13258
- throw new Error('Failed to create token provider from configuration');
13259
- }
13260
- return provider;
13261
- }
13262
- let provider = null;
13263
- try {
13264
- provider = await createDefaultResource(TOKEN_PROVIDER_FACTORY_BASE_TYPE, null, options);
13265
- }
13266
- catch (error) {
13267
- const message = 'Failed to create default token provider' +
13268
- (error instanceof Error && error.message ? `: ${error.message}` : '');
13269
- throw new Error(message);
13270
- }
13271
- if (!provider) {
13272
- throw new Error('Failed to create default token provider');
13273
- }
13274
- return provider;
13275
- }
13276
- }
13277
-
13278
- function isTokenProvider(candidate) {
13279
- return (typeof candidate === 'object' &&
13280
- candidate !== null &&
13281
- typeof candidate.getToken === 'function');
13282
- }
13283
- function isIdentityExposingTokenProvider(candidate) {
13284
- return (isTokenProvider(candidate) &&
13285
- typeof candidate.getIdentity ===
13286
- 'function');
13287
- }
13288
-
13289
- const logger$12 = getLogger('naylence.fame.node.default_node_identity_policy');
13254
+ /**
13255
+ * Default node identity policy that preserves the current node ID.
13256
+ *
13257
+ * This policy does NOT derive identity from tokens or grants.
13258
+ * For token-subject-based identity, use TokenSubjectNodeIdentityPolicy.
13259
+ */
13290
13260
  class DefaultNodeIdentityPolicy {
13291
13261
  async resolveInitialNodeId(context) {
13292
13262
  if (context.configuredId) {
@@ -13298,44 +13268,10 @@ class DefaultNodeIdentityPolicy {
13298
13268
  return await generateIdAsync({ mode: 'fingerprint' });
13299
13269
  }
13300
13270
  async resolveAdmissionNodeId(context) {
13301
- // Try to extract identity from grants first
13302
- if (context.grants && context.grants.length > 0) {
13303
- for (const grant of context.grants) {
13304
- try {
13305
- const auth = grant.auth;
13306
- if (!auth) {
13307
- continue;
13308
- }
13309
- const tokenProviderConfig = (auth.tokenProvider ??
13310
- auth.token_provider);
13311
- if (!tokenProviderConfig ||
13312
- typeof tokenProviderConfig.type !== 'string') {
13313
- continue;
13314
- }
13315
- const provider = await TokenProviderFactory.createTokenProvider(tokenProviderConfig);
13316
- if (isIdentityExposingTokenProvider(provider)) {
13317
- const identity = await provider.getIdentity();
13318
- if (identity && identity.subject) {
13319
- logger$12.debug('identity_extracted_from_grant', {
13320
- identity_id: identity.subject,
13321
- grant_type: grant.type,
13322
- });
13323
- return identity.subject;
13324
- }
13325
- }
13326
- }
13327
- catch (error) {
13328
- logger$12.warning('identity_extraction_failed', {
13329
- error: error instanceof Error ? error.message : String(error),
13330
- grant_type: grant.type,
13331
- });
13332
- }
13333
- }
13271
+ if (context.currentNodeId) {
13272
+ return context.currentNodeId;
13334
13273
  }
13335
- if (!context.currentNodeId) {
13336
- return await generateIdAsync({ mode: 'fingerprint' });
13337
- }
13338
- return context.currentNodeId;
13274
+ return await generateIdAsync({ mode: 'fingerprint' });
13339
13275
  }
13340
13276
  }
13341
13277
 
@@ -13409,7 +13345,7 @@ class AttachmentKeyValidator {
13409
13345
  }
13410
13346
  }
13411
13347
 
13412
- const logger$11 = getLogger('naylence.fame.node.admission.default_node_attach_client');
13348
+ const logger$12 = getLogger('naylence.fame.node.admission.default_node_attach_client');
13413
13349
  const HANDSHAKE_POLL_INTERVAL_MS = 20;
13414
13350
  class DefaultNodeAttachClient {
13415
13351
  constructor(options = {}) {
@@ -13433,7 +13369,7 @@ class DefaultNodeAttachClient {
13433
13369
  }
13434
13370
  else {
13435
13371
  // Silently ignore frames from other agents during concurrent handshakes
13436
- logger$11.debug('handshake_ignoring_frame_from_different_system', {
13372
+ logger$12.debug('handshake_ignoring_frame_from_different_system', {
13437
13373
  frame_type: envelope.frame.type,
13438
13374
  frame_system_id: frameSystemId,
13439
13375
  expected_system_id: this.expectedSystemId,
@@ -13476,7 +13412,7 @@ class DefaultNodeAttachClient {
13476
13412
  }
13477
13413
  }
13478
13414
  catch (error) {
13479
- logger$11.debug('stickiness_offer_skipped', {
13415
+ logger$12.debug('stickiness_offer_skipped', {
13480
13416
  error: error instanceof Error ? error.message : String(error),
13481
13417
  });
13482
13418
  }
@@ -13497,7 +13433,7 @@ class DefaultNodeAttachClient {
13497
13433
  if (!processedEnvelope) {
13498
13434
  throw new Error('Envelope was blocked by onForwardUpstream event');
13499
13435
  }
13500
- logger$11.debug('sending_node_attach_envelope', {
13436
+ logger$12.debug('sending_node_attach_envelope', {
13501
13437
  envp_id: processedEnvelope.id ?? envelope.id ?? null,
13502
13438
  frame_type: processedEnvelope.frame?.type ?? 'unknown',
13503
13439
  trace_id: processedEnvelope.traceId ?? envelope.traceId ?? null,
@@ -13533,7 +13469,7 @@ class DefaultNodeAttachClient {
13533
13469
  try {
13534
13470
  const keyInfos = await this.attachmentKeyValidator.validateKeys(parentKeys);
13535
13471
  if (Array.isArray(keyInfos) && keyInfos.length > 0) {
13536
- logger$11.debug('parent_certificate_validation_passed', {
13472
+ logger$12.debug('parent_certificate_validation_passed', {
13537
13473
  parent_id: parentId,
13538
13474
  correlation_id: corrId,
13539
13475
  validated_keys: keyInfos.length,
@@ -13542,7 +13478,7 @@ class DefaultNodeAttachClient {
13542
13478
  }
13543
13479
  catch (error) {
13544
13480
  if (error instanceof KeyValidationError) {
13545
- logger$11.error('parent_certificate_validation_failed', {
13481
+ logger$12.error('parent_certificate_validation_failed', {
13546
13482
  parent_id: parentId,
13547
13483
  correlation_id: corrId,
13548
13484
  error_code: error.code,
@@ -13556,12 +13492,12 @@ class DefaultNodeAttachClient {
13556
13492
  }
13557
13493
  }
13558
13494
  else {
13559
- logger$11.debug('parent_certificate_validation_skipped', {
13495
+ logger$12.debug('parent_certificate_validation_skipped', {
13560
13496
  parent_id: parentId,
13561
13497
  reason: 'no_validator',
13562
13498
  });
13563
13499
  }
13564
- logger$11.debug('processing_node_attach_ack', {
13500
+ logger$12.debug('processing_node_attach_ack', {
13565
13501
  parent_id: ackFrame.targetSystemId,
13566
13502
  });
13567
13503
  this.inHandshake = false;
@@ -13592,7 +13528,7 @@ class DefaultNodeAttachClient {
13592
13528
  }
13593
13529
  }
13594
13530
  catch (error) {
13595
- logger$11.debug('stickiness_accept_skipped', {
13531
+ logger$12.debug('stickiness_accept_skipped', {
13596
13532
  error: error instanceof Error ? error.message : String(error),
13597
13533
  });
13598
13534
  }
@@ -13646,7 +13582,7 @@ class DefaultNodeAttachClient {
13646
13582
  // NodeAttach frames during handshake are expected in multi-agent scenarios
13647
13583
  // where multiple agents attach concurrently to the same channel
13648
13584
  if (envelope.frame.type === 'NodeAttach') {
13649
- logger$11.debug('handshake_ignoring_concurrent_attach', {
13585
+ logger$12.debug('handshake_ignoring_concurrent_attach', {
13650
13586
  frame_type: envelope.frame.type,
13651
13587
  frame_system_id: envelope.frame?.systemId ??
13652
13588
  'unknown',
@@ -13654,7 +13590,7 @@ class DefaultNodeAttachClient {
13654
13590
  }
13655
13591
  else {
13656
13592
  // Other unexpected frames are still logged as errors
13657
- logger$11.error('unexpected_frame_during_handshake', {
13593
+ logger$12.error('unexpected_frame_during_handshake', {
13658
13594
  frame_type: envelope.frame.type,
13659
13595
  });
13660
13596
  }
@@ -13794,7 +13730,7 @@ class TraceEmitterFactory extends AbstractResourceFactory {
13794
13730
  // void import('./trace-emitter-profile-factory.js');
13795
13731
 
13796
13732
  const BINDING_STORE_NAMESPACE = '__binding_store';
13797
- const logger$10 = getLogger('naylence.fame.node.factory_commons');
13733
+ const logger$11 = getLogger('naylence.fame.node.factory_commons');
13798
13734
  function isPlainRecord$2(value) {
13799
13735
  return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
13800
13736
  }
@@ -13988,7 +13924,7 @@ async function resolveNodeIdentityPolicy(config, options) {
13988
13924
  return await NodeIdentityPolicyFactory.createNodeIdentityPolicy(config ?? undefined, cloneCreateOptions(options));
13989
13925
  }
13990
13926
  catch (error) {
13991
- logger$10.warning('node_identity_policy_creation_failed', {
13927
+ logger$11.warning('node_identity_policy_creation_failed', {
13992
13928
  error: error instanceof Error ? error.message : String(error),
13993
13929
  });
13994
13930
  return null;
@@ -13999,7 +13935,7 @@ async function resolveConnectionRetryPolicy(config, options) {
13999
13935
  return await ConnectionRetryPolicyFactory.createConnectionRetryPolicy(config ?? undefined, cloneCreateOptions(options));
14000
13936
  }
14001
13937
  catch (error) {
14002
- logger$10.warning('connection_retry_policy_creation_failed', {
13938
+ logger$11.warning('connection_retry_policy_creation_failed', {
14003
13939
  error: error instanceof Error ? error.message : String(error),
14004
13940
  });
14005
13941
  return null;
@@ -14011,7 +13947,7 @@ async function resolveStorageProvider(config, options) {
14011
13947
  return await StorageProviderFactory.createStorageProvider(config, cloneCreateOptions(options));
14012
13948
  }
14013
13949
  catch (error) {
14014
- logger$10.warning('storage_provider_creation_failed', {
13950
+ logger$11.warning('storage_provider_creation_failed', {
14015
13951
  error: error instanceof Error ? error.message : String(error),
14016
13952
  });
14017
13953
  }
@@ -14033,7 +13969,7 @@ async function resolveAdmissionClient(config, options, identityPolicy) {
14033
13969
  return await AdmissionClientFactory.createAdmissionClient((config ?? null), createOptions);
14034
13970
  }
14035
13971
  catch (error) {
14036
- logger$10.warning('admission_client_creation_failed', {
13972
+ logger$11.warning('admission_client_creation_failed', {
14037
13973
  error: error instanceof Error ? error.message : String(error),
14038
13974
  });
14039
13975
  return null;
@@ -14060,7 +13996,7 @@ async function resolveReplicaStickinessManager(hasParent, requestedLogicals, opt
14060
13996
  return await ReplicaStickinessManagerFactory.createReplicaStickinessManager(undefined, cloneCreateOptions(options));
14061
13997
  }
14062
13998
  catch (error) {
14063
- logger$10.debug('replica_stickiness_manager_unavailable', { error });
13999
+ logger$11.debug('replica_stickiness_manager_unavailable', { error });
14064
14000
  return null;
14065
14001
  }
14066
14002
  }
@@ -14069,7 +14005,7 @@ async function resolveAttachmentKeyValidator(config, options) {
14069
14005
  return await AttachmentKeyValidatorFactory.createAttachmentKeyValidator(config ?? undefined, cloneCreateOptions(options));
14070
14006
  }
14071
14007
  catch (error) {
14072
- logger$10.warning('attachment_key_validator_creation_failed', {
14008
+ logger$11.warning('attachment_key_validator_creation_failed', {
14073
14009
  error: error instanceof Error ? error.message : String(error),
14074
14010
  });
14075
14011
  return null;
@@ -14087,7 +14023,7 @@ async function resolveDeliveryPolicy(config, options) {
14087
14023
  return await DeliveryPolicyFactory.createDeliveryPolicy(config ?? undefined, cloneCreateOptions(options));
14088
14024
  }
14089
14025
  catch (error) {
14090
- logger$10.warning('delivery_policy_creation_failed', {
14026
+ logger$11.warning('delivery_policy_creation_failed', {
14091
14027
  error: error instanceof Error ? error.message : String(error),
14092
14028
  });
14093
14029
  return null;
@@ -14101,7 +14037,7 @@ async function resolveTransportListeners(configs, eventListeners, options) {
14101
14037
  return await TransportListenerFactory.createTransportListeners(configs, eventListeners, cloneCreateOptions(options));
14102
14038
  }
14103
14039
  catch (error) {
14104
- logger$10.warning('transport_listener_creation_failed', {
14040
+ logger$11.warning('transport_listener_creation_failed', {
14105
14041
  error: error instanceof Error ? error.message : String(error),
14106
14042
  });
14107
14043
  return [];
@@ -14112,7 +14048,7 @@ async function resolveTraceEmitter(config, options) {
14112
14048
  return await TraceEmitterFactory.createTraceEmitter(config ?? undefined, cloneCreateOptions(options));
14113
14049
  }
14114
14050
  catch (error) {
14115
- logger$10.warning('trace_emitter_creation_failed', {
14051
+ logger$11.warning('trace_emitter_creation_failed', {
14116
14052
  error: error instanceof Error ? error.message : String(error),
14117
14053
  });
14118
14054
  return null;
@@ -14168,7 +14104,7 @@ async function createSecurityManagerFromConfig(config, overrides, options) {
14168
14104
  return manager ?? null;
14169
14105
  }
14170
14106
  catch (error) {
14171
- logger$10.warning('security_manager_creation_failed', {
14107
+ logger$11.warning('security_manager_creation_failed', {
14172
14108
  error: error instanceof Error ? error.message : String(error),
14173
14109
  });
14174
14110
  return null;
@@ -14197,7 +14133,7 @@ async function resolveCryptoProvider(config, options) {
14197
14133
  // This happens with overlay security profiles that need envelope signing
14198
14134
  if (requiresCryptoProvider(config)) {
14199
14135
  try {
14200
- logger$10.debug('auto_creating_crypto_provider', {
14136
+ logger$11.debug('auto_creating_crypto_provider', {
14201
14137
  reason: 'overlay_security_requires_signing',
14202
14138
  });
14203
14139
  // Dynamically import to avoid circular dependencies
@@ -14217,7 +14153,7 @@ async function resolveCryptoProvider(config, options) {
14217
14153
  });
14218
14154
  }
14219
14155
  catch (error) {
14220
- logger$10.error('failed_to_auto_create_crypto_provider', {
14156
+ logger$11.error('failed_to_auto_create_crypto_provider', {
14221
14157
  error: error instanceof Error ? error.message : String(error),
14222
14158
  });
14223
14159
  throw error;
@@ -14763,7 +14699,7 @@ class NodeLikeFactory extends AbstractResourceFactory {
14763
14699
  // registerFactory(NODE_LIKE_FACTORY_BASE_TYPE, type, factory);
14764
14700
  // }
14765
14701
 
14766
- const FACTORY_META$1b = {
14702
+ const FACTORY_META$1c = {
14767
14703
  base: NODE_LIKE_FACTORY_BASE_TYPE,
14768
14704
  key: 'Node',
14769
14705
  };
@@ -14805,7 +14741,7 @@ class NodeFactory extends NodeLikeFactory {
14805
14741
 
14806
14742
  var nodeFactory = /*#__PURE__*/Object.freeze({
14807
14743
  __proto__: null,
14808
- FACTORY_META: FACTORY_META$1b,
14744
+ FACTORY_META: FACTORY_META$1c,
14809
14745
  NodeFactory: NodeFactory,
14810
14746
  default: NodeFactory
14811
14747
  });
@@ -15382,7 +15318,7 @@ function normalizeSecurityRequirements(value) {
15382
15318
  };
15383
15319
  }
15384
15320
 
15385
- const logger$$ = getLogger('naylence.fame.node.envelope_security_handler');
15321
+ const logger$10 = getLogger('naylence.fame.node.envelope_security_handler');
15386
15322
  const ENCRYPTION_OPTION_ALIAS_PAIRS = [
15387
15323
  ['recipKid', 'recip_kid'],
15388
15324
  ['recipientKeyId', 'recipient_key_id'],
@@ -15431,7 +15367,7 @@ class EnvelopeSecurityHandler {
15431
15367
  const shouldSign = this.securityPolicy
15432
15368
  ? await this.securityPolicy.shouldSignEnvelope(envelope, context, this.node)
15433
15369
  : false;
15434
- logger$$.debug('checking_signing', {
15370
+ logger$10.debug('checking_signing', {
15435
15371
  has_signer: Boolean(this.envelopeSigner),
15436
15372
  should_sign: shouldSign,
15437
15373
  envp_id: envelope.id,
@@ -15453,7 +15389,7 @@ class EnvelopeSecurityHandler {
15453
15389
  const shouldEncrypt = this.securityPolicy
15454
15390
  ? await this.securityPolicy.shouldEncryptEnvelope(envelope, context, this.node)
15455
15391
  : false;
15456
- logger$$.debug('checking_encryption', {
15392
+ logger$10.debug('checking_encryption', {
15457
15393
  has_encryption_manager: Boolean(this.encryptionManager),
15458
15394
  should_encrypt: shouldEncrypt,
15459
15395
  envp_id: envelope.id,
@@ -15461,7 +15397,7 @@ class EnvelopeSecurityHandler {
15461
15397
  });
15462
15398
  if (this.encryptionManager && this.securityPolicy) {
15463
15399
  if (envelope.sec?.enc) {
15464
- logger$$.debug('skipping_encryption_already_encrypted', {
15400
+ logger$10.debug('skipping_encryption_already_encrypted', {
15465
15401
  envp_id: envelope.id,
15466
15402
  destination: envelope.to ? String(envelope.to) : undefined,
15467
15403
  });
@@ -15474,7 +15410,7 @@ class EnvelopeSecurityHandler {
15474
15410
  CryptoLevel.PLAINTEXT;
15475
15411
  desiredCryptoLevel =
15476
15412
  await this.securityPolicy.decideResponseCryptoLevel(requestCryptoLevel, envelope, context);
15477
- logger$$.debug('response_crypto_level_decided', {
15413
+ logger$10.debug('response_crypto_level_decided', {
15478
15414
  envp_id: envelope.id,
15479
15415
  crypto_level: desiredCryptoLevel,
15480
15416
  destination: envelope.to ? String(envelope.to) : undefined,
@@ -15485,7 +15421,7 @@ class EnvelopeSecurityHandler {
15485
15421
  else {
15486
15422
  desiredCryptoLevel =
15487
15423
  await this.securityPolicy.decideOutboundCryptoLevel(envelope, context, this.node);
15488
- logger$$.debug('outbound_crypto_level_decided', {
15424
+ logger$10.debug('outbound_crypto_level_decided', {
15489
15425
  envp_id: envelope.id,
15490
15426
  frame_type: envelope.frame.type,
15491
15427
  crypto_level: desiredCryptoLevel,
@@ -15493,11 +15429,11 @@ class EnvelopeSecurityHandler {
15493
15429
  });
15494
15430
  }
15495
15431
  if (desiredCryptoLevel === CryptoLevel.SEALED) {
15496
- logger$$.debug('applying_sealed_encryption', { envp_id: envelope.id });
15432
+ logger$10.debug('applying_sealed_encryption', { envp_id: envelope.id });
15497
15433
  return await this.handleSealedEncryption(envelope, context);
15498
15434
  }
15499
15435
  if (desiredCryptoLevel === CryptoLevel.CHANNEL) {
15500
- logger$$.debug('applying_channel_encryption', { envp_id: envelope.id });
15436
+ logger$10.debug('applying_channel_encryption', { envp_id: envelope.id });
15501
15437
  return await this.handleChannelEncryption(envelope, context);
15502
15438
  }
15503
15439
  }
@@ -15548,7 +15484,7 @@ class EnvelopeSecurityHandler {
15548
15484
  frameType === 'KeyAnnounce' ||
15549
15485
  frameType === 'SecureOpen' ||
15550
15486
  frameType === 'SecureAccept') {
15551
- logger$$.error('critical_frame_unsigned_rejected', {
15487
+ logger$10.error('critical_frame_unsigned_rejected', {
15552
15488
  envp_id: envelope.id,
15553
15489
  frame_type: frameType,
15554
15490
  reason: 'critical_frames_must_be_signed',
@@ -15556,7 +15492,7 @@ class EnvelopeSecurityHandler {
15556
15492
  return [envelope, false];
15557
15493
  }
15558
15494
  const action = this.securityPolicy.getUnsignedViolationAction(envelope, context);
15559
- logger$$.warning('unsigned_envelope_violation', {
15495
+ logger$10.warning('unsigned_envelope_violation', {
15560
15496
  envp_id: envelope.id,
15561
15497
  frame_type: frameType,
15562
15498
  action,
@@ -15568,26 +15504,26 @@ class EnvelopeSecurityHandler {
15568
15504
  return [envelope, true];
15569
15505
  }
15570
15506
  async handleChannelHandshakeComplete(channelId, destination) {
15571
- logger$$.debug('channel_handshake_completed', {
15507
+ logger$10.debug('channel_handshake_completed', {
15572
15508
  channel_id: channelId,
15573
15509
  destination,
15574
15510
  });
15575
15511
  if (this.encryptionManager?.notifyChannelEstablished) {
15576
15512
  await this.encryptionManager.notifyChannelEstablished(channelId);
15577
- logger$$.debug('notified_encryption_manager_channel_ready', {
15513
+ logger$10.debug('notified_encryption_manager_channel_ready', {
15578
15514
  channel_id: channelId,
15579
15515
  });
15580
15516
  }
15581
15517
  }
15582
15518
  async handleChannelHandshakeFailed(channelId, destination, reason = 'handshake_failed') {
15583
- logger$$.debug('channel_handshake_failed', {
15519
+ logger$10.debug('channel_handshake_failed', {
15584
15520
  channel_id: channelId,
15585
15521
  destination,
15586
15522
  reason,
15587
15523
  });
15588
15524
  if (this.encryptionManager?.notifyChannelFailed) {
15589
15525
  await this.encryptionManager.notifyChannelFailed(channelId, reason);
15590
- logger$$.debug('notified_encryption_manager_channel_failed', {
15526
+ logger$10.debug('notified_encryption_manager_channel_failed', {
15591
15527
  channel_id: channelId,
15592
15528
  reason,
15593
15529
  });
@@ -15634,7 +15570,7 @@ class EnvelopeSecurityHandler {
15634
15570
  checkPayload: false,
15635
15571
  });
15636
15572
  if (verified) {
15637
- logger$$.debug('envelope_verified', {
15573
+ logger$10.debug('envelope_verified', {
15638
15574
  envp_id: envelope.id,
15639
15575
  sid: envelope.sid,
15640
15576
  kid,
@@ -15645,7 +15581,7 @@ class EnvelopeSecurityHandler {
15645
15581
  }
15646
15582
  this.keyManagementHandler.queuePendingSignedEnvelope(kid, envelope, context);
15647
15583
  await this.keyManagementHandler.maybeRequestSigningKey(kid, context.originType, fromSystemId);
15648
- logger$$.debug('queued_envelope_missing_signing_key', {
15584
+ logger$10.debug('queued_envelope_missing_signing_key', {
15649
15585
  kid,
15650
15586
  envp_id: envelope.id,
15651
15587
  });
@@ -15653,7 +15589,7 @@ class EnvelopeSecurityHandler {
15653
15589
  }
15654
15590
  async handleSealedEncryption(envelope, context) {
15655
15591
  if (!envelope.to) {
15656
- logger$$.warning('sealed_encryption_requested_but_no_destination', {
15592
+ logger$10.warning('sealed_encryption_requested_but_no_destination', {
15657
15593
  envp_id: envelope.id,
15658
15594
  });
15659
15595
  return true;
@@ -15665,20 +15601,20 @@ class EnvelopeSecurityHandler {
15665
15601
  : undefined;
15666
15602
  if (options) {
15667
15603
  if (options.encryptionType === 'channel') {
15668
- logger$$.warning('policy_returned_channel_for_sealed_request', {
15604
+ logger$10.warning('policy_returned_channel_for_sealed_request', {
15669
15605
  envp_id: envelope.id,
15670
15606
  });
15671
15607
  return await this.handleToBeEncryptedEnvelopeWithOptions(envelope, context, normalizeEncryptionOptions({
15672
15608
  requestAddress: envelope.to,
15673
15609
  }));
15674
15610
  }
15675
- logger$$.debug('using_sealed_encryption_options', {
15611
+ logger$10.debug('using_sealed_encryption_options', {
15676
15612
  envp_id: envelope.id,
15677
15613
  options,
15678
15614
  });
15679
15615
  return await this.handleToBeEncryptedEnvelopeWithOptions(envelope, context, options);
15680
15616
  }
15681
- logger$$.debug('no_encryption_options_requesting_key', {
15617
+ logger$10.debug('no_encryption_options_requesting_key', {
15682
15618
  envp_id: envelope.id,
15683
15619
  });
15684
15620
  return await this.handleToBeEncryptedEnvelopeWithOptions(envelope, context, normalizeEncryptionOptions({
@@ -15686,7 +15622,7 @@ class EnvelopeSecurityHandler {
15686
15622
  }));
15687
15623
  }
15688
15624
  catch (error) {
15689
- logger$$.debug('sealed_key_lookup_failed_requesting', {
15625
+ logger$10.debug('sealed_key_lookup_failed_requesting', {
15690
15626
  envp_id: envelope.id,
15691
15627
  error: error instanceof Error ? error.message : String(error),
15692
15628
  });
@@ -15697,7 +15633,7 @@ class EnvelopeSecurityHandler {
15697
15633
  }
15698
15634
  async handleChannelEncryption(envelope, context) {
15699
15635
  if (!envelope.to) {
15700
- logger$$.warning('channel_encryption_requested_but_no_destination', {
15636
+ logger$10.warning('channel_encryption_requested_but_no_destination', {
15701
15637
  envp_id: envelope.id,
15702
15638
  });
15703
15639
  return true;
@@ -15712,13 +15648,13 @@ class EnvelopeSecurityHandler {
15712
15648
  return true;
15713
15649
  }
15714
15650
  if (context.originType !== DeliveryOriginType.LOCAL) {
15715
- logger$$.warning('envelope_encryption_rejected_non_local', {
15651
+ logger$10.warning('envelope_encryption_rejected_non_local', {
15716
15652
  origin: context.originType,
15717
15653
  });
15718
15654
  return true;
15719
15655
  }
15720
15656
  if (!isDataFrame$4(envelope.frame)) {
15721
- logger$$.trace('skipping_encryption_non_dataframe', {
15657
+ logger$10.trace('skipping_encryption_non_dataframe', {
15722
15658
  envp_id: envelope.id,
15723
15659
  frame_type: envelope.frame.type,
15724
15660
  });
@@ -15729,7 +15665,7 @@ class EnvelopeSecurityHandler {
15729
15665
  ? normalizeEncryptionOptions(rawOptions)
15730
15666
  : undefined;
15731
15667
  if (!options) {
15732
- logger$$.warning('no_encryption_options_provided', {
15668
+ logger$10.warning('no_encryption_options_provided', {
15733
15669
  envp_id: envelope.id,
15734
15670
  });
15735
15671
  return true;
@@ -15741,13 +15677,13 @@ class EnvelopeSecurityHandler {
15741
15677
  return true;
15742
15678
  }
15743
15679
  if (context.originType !== DeliveryOriginType.LOCAL) {
15744
- logger$$.warning('envelope_encryption_rejected_non_local', {
15680
+ logger$10.warning('envelope_encryption_rejected_non_local', {
15745
15681
  origin: context.originType,
15746
15682
  });
15747
15683
  return true;
15748
15684
  }
15749
15685
  if (!isDataFrame$4(envelope.frame)) {
15750
- logger$$.trace('skipping_encryption_non_dataframe', {
15686
+ logger$10.trace('skipping_encryption_non_dataframe', {
15751
15687
  envp_id: envelope.id,
15752
15688
  frame_type: envelope.frame.type,
15753
15689
  });
@@ -15764,7 +15700,7 @@ class EnvelopeSecurityHandler {
15764
15700
  // Skip encryption if envelope is already encrypted
15765
15701
  // This prevents re-queuing when replayed envelopes go through security again
15766
15702
  if (envelope.sec?.enc) {
15767
- logger$$.debug('skipping_encryption_already_encrypted', {
15703
+ logger$10.debug('skipping_encryption_already_encrypted', {
15768
15704
  envp_id: envelope.id,
15769
15705
  destination: envelope.to ? String(envelope.to) : undefined,
15770
15706
  });
@@ -15773,14 +15709,14 @@ class EnvelopeSecurityHandler {
15773
15709
  try {
15774
15710
  const result = await this.encryptionManager.encryptEnvelope(envelope, normalizedOptions);
15775
15711
  if (result.status === EncryptionStatus.QUEUED) {
15776
- logger$$.debug('envelope_queued_for_encryption', {
15712
+ logger$10.debug('envelope_queued_for_encryption', {
15777
15713
  envp_id: envelope.id,
15778
15714
  });
15779
15715
  await this.handleEncryptionQueueing(envelope, context, normalizedOptions);
15780
15716
  return false;
15781
15717
  }
15782
15718
  if (result.status === EncryptionStatus.OK) {
15783
- logger$$.debug('envelope_encrypted', { envp_id: envelope.id });
15719
+ logger$10.debug('envelope_encrypted', { envp_id: envelope.id });
15784
15720
  if (result.envelope) {
15785
15721
  envelope.frame = result.envelope.frame;
15786
15722
  envelope.sec = result.envelope.sec;
@@ -15788,17 +15724,17 @@ class EnvelopeSecurityHandler {
15788
15724
  return true;
15789
15725
  }
15790
15726
  if (result.status === EncryptionStatus.SKIPPED) {
15791
- logger$$.debug('envelope_encryption_skipped', { envp_id: envelope.id });
15727
+ logger$10.debug('envelope_encryption_skipped', { envp_id: envelope.id });
15792
15728
  return true;
15793
15729
  }
15794
- logger$$.warning('unknown_encryption_status', {
15730
+ logger$10.warning('unknown_encryption_status', {
15795
15731
  envp_id: envelope.id,
15796
15732
  status: result.status,
15797
15733
  });
15798
15734
  return true;
15799
15735
  }
15800
15736
  catch (error) {
15801
- logger$$.error('encryption_failed', {
15737
+ logger$10.error('encryption_failed', {
15802
15738
  envp_id: envelope.id,
15803
15739
  error: error instanceof Error ? error.message : String(error),
15804
15740
  });
@@ -15837,7 +15773,7 @@ class EnvelopeSecurityHandler {
15837
15773
  return;
15838
15774
  }
15839
15775
  if (normalizedOptions.encryptionType === 'channel') {
15840
- logger$$.debug('channel_encryption_queueing_handled_internally', {
15776
+ logger$10.debug('channel_encryption_queueing_handled_internally', {
15841
15777
  envp_id: envelope.id,
15842
15778
  destination: normalizedOptions.destination
15843
15779
  ? String(normalizedOptions.destination)
@@ -15845,13 +15781,13 @@ class EnvelopeSecurityHandler {
15845
15781
  });
15846
15782
  return;
15847
15783
  }
15848
- logger$$.warning('unknown_encryption_queueing_options', {
15784
+ logger$10.warning('unknown_encryption_queueing_options', {
15849
15785
  envp_id: envelope.id,
15850
15786
  options: normalizedOptions,
15851
15787
  });
15852
15788
  }
15853
15789
  async handleFailedChannelEnvelopeCleanup(destination, reason) {
15854
- logger$$.debug('channel_handshake_failure_cleanup_attempted', {
15790
+ logger$10.debug('channel_handshake_failure_cleanup_attempted', {
15855
15791
  destination,
15856
15792
  reason,
15857
15793
  note: 'envelope_cleanup_handled_by_encryption_manager',
@@ -15862,7 +15798,7 @@ class EnvelopeSecurityHandler {
15862
15798
  }
15863
15799
  }
15864
15800
 
15865
- const logger$_ = getLogger('naylence.fame.node.secure_channel_frame_handler');
15801
+ const logger$$ = getLogger('naylence.fame.node.secure_channel_frame_handler');
15866
15802
  function isPlainRecord$1(value) {
15867
15803
  if (typeof value !== 'object' || value === null) {
15868
15804
  return false;
@@ -15952,7 +15888,7 @@ class SecureChannelFrameHandler {
15952
15888
  assertSecureChannelManager(this.secureChannelManager);
15953
15889
  const frame = envelope.frame;
15954
15890
  assertFrameType(frame, 'SecureOpen');
15955
- logger$_.debug('received_secure_open', {
15891
+ logger$$.debug('received_secure_open', {
15956
15892
  cid: frame.cid,
15957
15893
  algorithm: frame.alg,
15958
15894
  });
@@ -15975,13 +15911,13 @@ class SecureChannelFrameHandler {
15975
15911
  stickySid: envelope.sid ?? undefined,
15976
15912
  expectedResponseType: FameResponseType.NONE,
15977
15913
  };
15978
- logger$_.debug('stickiness_requested_for_channel_encryption', {
15914
+ logger$$.debug('stickiness_requested_for_channel_encryption', {
15979
15915
  cid: frame.cid,
15980
15916
  reason: 'secure_channel_established',
15981
15917
  });
15982
15918
  }
15983
15919
  await this.sendCallback(responseEnvelope, responseContext);
15984
- logger$_.debug('sent_secure_accept', { cid: frame.cid, ok: acceptFrame.ok });
15920
+ logger$$.debug('sent_secure_accept', { cid: frame.cid, ok: acceptFrame.ok });
15985
15921
  if (acceptFrame.ok && this.envelopeSecurityHandler) {
15986
15922
  const destination = extractDestinationFromChannelId(frame.cid);
15987
15923
  if (destination) {
@@ -15993,13 +15929,13 @@ class SecureChannelFrameHandler {
15993
15929
  assertSecureChannelManager(this.secureChannelManager);
15994
15930
  const frame = envelope.frame;
15995
15931
  assertFrameType(frame, 'SecureAccept');
15996
- logger$_.debug('received_secure_accept', { cid: frame.cid, ok: frame.ok });
15932
+ logger$$.debug('received_secure_accept', { cid: frame.cid, ok: frame.ok });
15997
15933
  const success = await this.secureChannelManager.handleAcceptFrame(frame);
15998
15934
  if (!success) {
15999
- logger$_.warning('failed_to_complete_channel', { cid: frame.cid });
15935
+ logger$$.warning('failed_to_complete_channel', { cid: frame.cid });
16000
15936
  }
16001
15937
  else {
16002
- logger$_.debug('channel_established', { cid: frame.cid });
15938
+ logger$$.debug('channel_established', { cid: frame.cid });
16003
15939
  if (this.envelopeSecurityHandler) {
16004
15940
  const destination = extractDestinationFromChannelId(frame.cid);
16005
15941
  if (destination) {
@@ -16011,7 +15947,7 @@ class SecureChannelFrameHandler {
16011
15947
  const destination = extractDestinationFromChannelId(frame.cid);
16012
15948
  if (destination) {
16013
15949
  await this.envelopeSecurityHandler.handleChannelHandshakeFailed(frame.cid, destination, 'negative_secure_accept');
16014
- logger$_.debug('notified_handshake_failure', {
15950
+ logger$$.debug('notified_handshake_failure', {
16015
15951
  cid: frame.cid,
16016
15952
  destination,
16017
15953
  });
@@ -16022,7 +15958,7 @@ class SecureChannelFrameHandler {
16022
15958
  assertSecureChannelManager(this.secureChannelManager);
16023
15959
  const frame = envelope.frame;
16024
15960
  assertFrameType(frame, 'SecureClose');
16025
- logger$_.debug('received_secure_close', {
15961
+ logger$$.debug('received_secure_close', {
16026
15962
  cid: frame.cid,
16027
15963
  reason: frame.reason,
16028
15964
  });
@@ -16080,7 +16016,7 @@ function createNodeDeliveryContext(options = {}) {
16080
16016
  class FameEnvironmentContext {
16081
16017
  }
16082
16018
 
16083
- const FACTORY_META$1a = {
16019
+ const FACTORY_META$1b = {
16084
16020
  base: NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE,
16085
16021
  key: 'DefaultNodeIdentityPolicy',
16086
16022
  };
@@ -16098,11 +16034,48 @@ class DefaultNodeIdentityPolicyFactory extends NodeIdentityPolicyFactory {
16098
16034
  var defaultNodeIdentityPolicyFactory = /*#__PURE__*/Object.freeze({
16099
16035
  __proto__: null,
16100
16036
  DefaultNodeIdentityPolicyFactory: DefaultNodeIdentityPolicyFactory,
16101
- FACTORY_META: FACTORY_META$1a,
16037
+ FACTORY_META: FACTORY_META$1b,
16102
16038
  default: DefaultNodeIdentityPolicyFactory
16103
16039
  });
16104
16040
 
16105
- const logger$Z = getLogger('naylence.fame.node.token_subject_node_identity_policy');
16041
+ const TOKEN_PROVIDER_FACTORY_BASE_TYPE = 'TokenProviderFactory';
16042
+ class TokenProviderFactory extends AbstractResourceFactory {
16043
+ static async createTokenProvider(config, options = {}) {
16044
+ if (config) {
16045
+ const provider = await createResource$1(TOKEN_PROVIDER_FACTORY_BASE_TYPE, config, options);
16046
+ if (!provider) {
16047
+ throw new Error('Failed to create token provider from configuration');
16048
+ }
16049
+ return provider;
16050
+ }
16051
+ let provider = null;
16052
+ try {
16053
+ provider = await createDefaultResource(TOKEN_PROVIDER_FACTORY_BASE_TYPE, null, options);
16054
+ }
16055
+ catch (error) {
16056
+ const message = 'Failed to create default token provider' +
16057
+ (error instanceof Error && error.message ? `: ${error.message}` : '');
16058
+ throw new Error(message);
16059
+ }
16060
+ if (!provider) {
16061
+ throw new Error('Failed to create default token provider');
16062
+ }
16063
+ return provider;
16064
+ }
16065
+ }
16066
+
16067
+ function isTokenProvider(candidate) {
16068
+ return (typeof candidate === 'object' &&
16069
+ candidate !== null &&
16070
+ typeof candidate.getToken === 'function');
16071
+ }
16072
+ function isIdentityExposingTokenProvider(candidate) {
16073
+ return (isTokenProvider(candidate) &&
16074
+ typeof candidate.getIdentity ===
16075
+ 'function');
16076
+ }
16077
+
16078
+ const logger$_ = getLogger('naylence.fame.node.token_subject_node_identity_policy');
16106
16079
  class TokenSubjectNodeIdentityPolicy {
16107
16080
  async resolveInitialNodeId(context) {
16108
16081
  if (context.configuredId) {
@@ -16114,7 +16087,7 @@ class TokenSubjectNodeIdentityPolicy {
16114
16087
  return generateIdAsync();
16115
16088
  }
16116
16089
  async resolveAdmissionNodeId(context) {
16117
- logger$Z.debug('resolve_admission_node_id_start', {
16090
+ logger$_.debug('resolve_admission_node_id_start', {
16118
16091
  grantsCount: context.grants?.length ?? 0,
16119
16092
  currentNodeId: context.currentNodeId,
16120
16093
  });
@@ -16123,31 +16096,31 @@ class TokenSubjectNodeIdentityPolicy {
16123
16096
  try {
16124
16097
  const auth = grant.auth;
16125
16098
  if (!auth) {
16126
- logger$Z.debug('skipping_grant_no_auth', { grantType: grant.type });
16099
+ logger$_.debug('skipping_grant_no_auth', { grantType: grant.type });
16127
16100
  continue;
16128
16101
  }
16129
16102
  const tokenProviderConfig = (auth.tokenProvider ??
16130
16103
  auth.token_provider);
16131
16104
  if (!tokenProviderConfig ||
16132
16105
  typeof tokenProviderConfig.type !== 'string') {
16133
- logger$Z.debug('skipping_grant_invalid_token_provider_config', {
16106
+ logger$_.debug('skipping_grant_invalid_token_provider_config', {
16134
16107
  grantType: grant.type,
16135
16108
  config: tokenProviderConfig,
16136
16109
  });
16137
16110
  continue;
16138
16111
  }
16139
- logger$Z.debug('creating_token_provider', {
16112
+ logger$_.debug('creating_token_provider', {
16140
16113
  type: tokenProviderConfig.type,
16141
16114
  });
16142
16115
  const provider = await TokenProviderFactory.createTokenProvider(tokenProviderConfig);
16143
16116
  const isExposing = isIdentityExposingTokenProvider(provider);
16144
- logger$Z.debug('token_provider_created', {
16117
+ logger$_.debug('token_provider_created', {
16145
16118
  type: tokenProviderConfig.type,
16146
16119
  isIdentityExposing: isExposing,
16147
16120
  });
16148
16121
  if (isExposing) {
16149
16122
  const identity = await provider.getIdentity();
16150
- logger$Z.debug('retrieved_identity', { identity });
16123
+ logger$_.debug('retrieved_identity', { identity });
16151
16124
  if (identity && identity.subject) {
16152
16125
  const hashedSubject = await generateIdAsync({
16153
16126
  mode: 'fingerprint',
@@ -16155,7 +16128,7 @@ class TokenSubjectNodeIdentityPolicy {
16155
16128
  length: 8,
16156
16129
  });
16157
16130
  const newNodeId = `${hashedSubject}-${context.currentNodeId}`;
16158
- logger$Z.info('resolved_identity_from_token', {
16131
+ logger$_.info('resolved_identity_from_token', {
16159
16132
  subject: identity.subject,
16160
16133
  hashedSubject,
16161
16134
  newNodeId,
@@ -16163,17 +16136,17 @@ class TokenSubjectNodeIdentityPolicy {
16163
16136
  return newNodeId;
16164
16137
  }
16165
16138
  else {
16166
- logger$Z.debug('identity_missing_subject', { identity });
16139
+ logger$_.debug('identity_missing_subject', { identity });
16167
16140
  }
16168
16141
  }
16169
16142
  }
16170
16143
  catch (err) {
16171
- logger$Z.warning('failed_to_extract_identity_from_grant', { error: err });
16144
+ logger$_.warning('failed_to_extract_identity_from_grant', { error: err });
16172
16145
  }
16173
16146
  }
16174
16147
  }
16175
16148
  else {
16176
- logger$Z.debug('no_grants_available');
16149
+ logger$_.debug('no_grants_available');
16177
16150
  }
16178
16151
  return context.currentNodeId;
16179
16152
  }
@@ -16184,7 +16157,7 @@ var tokenSubjectNodeIdentityPolicy = /*#__PURE__*/Object.freeze({
16184
16157
  TokenSubjectNodeIdentityPolicy: TokenSubjectNodeIdentityPolicy
16185
16158
  });
16186
16159
 
16187
- const FACTORY_META$19 = {
16160
+ const FACTORY_META$1a = {
16188
16161
  base: NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE,
16189
16162
  key: 'TokenSubjectNodeIdentityPolicy',
16190
16163
  };
@@ -16203,27 +16176,27 @@ class TokenSubjectNodeIdentityPolicyFactory extends NodeIdentityPolicyFactory {
16203
16176
 
16204
16177
  var tokenSubjectNodeIdentityPolicyFactory = /*#__PURE__*/Object.freeze({
16205
16178
  __proto__: null,
16206
- FACTORY_META: FACTORY_META$19,
16179
+ FACTORY_META: FACTORY_META$1a,
16207
16180
  TokenSubjectNodeIdentityPolicyFactory: TokenSubjectNodeIdentityPolicyFactory,
16208
16181
  default: TokenSubjectNodeIdentityPolicyFactory
16209
16182
  });
16210
16183
 
16211
- const logger$Y = getLogger('naylence.fame.node.node_identity_policy_profile_factory');
16212
- const PROFILE_NAME_DEFAULT = 'default';
16184
+ const logger$Z = getLogger('naylence.fame.node.node_identity_policy_profile_factory');
16185
+ const PROFILE_NAME_DEFAULT$1 = 'default';
16213
16186
  const PROFILE_NAME_TOKEN_SUBJECT = 'token-subject';
16214
16187
  const PROFILE_NAME_TOKEN_SUBJECT_ALIAS = 'token_subject';
16215
- const DEFAULT_PROFILE = {
16188
+ const DEFAULT_PROFILE$1 = {
16216
16189
  type: 'DefaultNodeIdentityPolicy',
16217
16190
  };
16218
16191
  const TOKEN_SUBJECT_PROFILE = {
16219
16192
  type: 'TokenSubjectNodeIdentityPolicy',
16220
16193
  };
16221
- const PROFILE_MAP$5 = {
16222
- [PROFILE_NAME_DEFAULT]: DEFAULT_PROFILE,
16194
+ const PROFILE_MAP$6 = {
16195
+ [PROFILE_NAME_DEFAULT$1]: DEFAULT_PROFILE$1,
16223
16196
  [PROFILE_NAME_TOKEN_SUBJECT]: TOKEN_SUBJECT_PROFILE,
16224
16197
  [PROFILE_NAME_TOKEN_SUBJECT_ALIAS]: TOKEN_SUBJECT_PROFILE,
16225
16198
  };
16226
- const FACTORY_META$18 = {
16199
+ const FACTORY_META$19 = {
16227
16200
  base: NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE,
16228
16201
  key: 'NodeIdentityPolicyProfile',
16229
16202
  };
@@ -16233,17 +16206,17 @@ class NodeIdentityPolicyProfileFactory extends NodeIdentityPolicyFactory {
16233
16206
  this.type = 'NodeIdentityPolicyProfile';
16234
16207
  }
16235
16208
  async create(config) {
16236
- const normalized = normalizeConfig$w(config);
16237
- const profileConfig = resolveProfileConfig$4(normalized.profile);
16238
- logger$Y.debug('enabling_node_identity_policy_profile', {
16209
+ const normalized = normalizeConfig$x(config);
16210
+ const profileConfig = resolveProfileConfig$5(normalized.profile);
16211
+ logger$Z.debug('enabling_node_identity_policy_profile', {
16239
16212
  profile: normalized.profile,
16240
16213
  });
16241
16214
  return NodeIdentityPolicyFactory.createNodeIdentityPolicy(profileConfig);
16242
16215
  }
16243
16216
  }
16244
- function normalizeConfig$w(config) {
16217
+ function normalizeConfig$x(config) {
16245
16218
  if (!config) {
16246
- return { profile: PROFILE_NAME_DEFAULT };
16219
+ return { profile: PROFILE_NAME_DEFAULT$1 };
16247
16220
  }
16248
16221
  const candidate = config;
16249
16222
  const profileValue = typeof candidate.profile === 'string' && candidate.profile.trim().length > 0
@@ -16254,24 +16227,24 @@ function normalizeConfig$w(config) {
16254
16227
  : typeof candidate.profileName === 'string' &&
16255
16228
  candidate.profileName.trim().length > 0
16256
16229
  ? candidate.profileName
16257
- : PROFILE_NAME_DEFAULT;
16230
+ : PROFILE_NAME_DEFAULT$1;
16258
16231
  const normalizedProfile = profileValue.trim().toLowerCase();
16259
16232
  return { profile: normalizedProfile };
16260
16233
  }
16261
- function resolveProfileConfig$4(profileName) {
16262
- const profile = PROFILE_MAP$5[profileName];
16234
+ function resolveProfileConfig$5(profileName) {
16235
+ const profile = PROFILE_MAP$6[profileName];
16263
16236
  if (!profile) {
16264
16237
  throw new Error(`Unknown node identity policy profile: ${profileName}`);
16265
16238
  }
16266
- return deepClone$4(profile);
16239
+ return deepClone$5(profile);
16267
16240
  }
16268
- function deepClone$4(value) {
16241
+ function deepClone$5(value) {
16269
16242
  return JSON.parse(JSON.stringify(value));
16270
16243
  }
16271
16244
 
16272
16245
  var nodeIdentityPolicyProfileFactory = /*#__PURE__*/Object.freeze({
16273
16246
  __proto__: null,
16274
- FACTORY_META: FACTORY_META$18,
16247
+ FACTORY_META: FACTORY_META$19,
16275
16248
  NodeIdentityPolicyProfileFactory: NodeIdentityPolicyProfileFactory,
16276
16249
  default: NodeIdentityPolicyProfileFactory
16277
16250
  });
@@ -16324,8 +16297,8 @@ class DefaultConnectionRetryPolicy {
16324
16297
  }
16325
16298
  }
16326
16299
 
16327
- const logger$X = getLogger('naylence.fame.node.default-connection-retry-policy-factory');
16328
- const FACTORY_META$17 = {
16300
+ const logger$Y = getLogger('naylence.fame.node.default-connection-retry-policy-factory');
16301
+ const FACTORY_META$18 = {
16329
16302
  base: CONNECTION_RETRY_POLICY_FACTORY_BASE_TYPE,
16330
16303
  key: 'DefaultConnectionRetryPolicy',
16331
16304
  };
@@ -16346,7 +16319,7 @@ class DefaultConnectionRetryPolicyFactory extends ConnectionRetryPolicyFactory {
16346
16319
  }
16347
16320
  }
16348
16321
  const policy = new DefaultConnectionRetryPolicy(options);
16349
- logger$X.debug('connection_retry_policy_created', {
16322
+ logger$Y.debug('connection_retry_policy_created', {
16350
16323
  maxInitialAttempts: policy.maxInitialAttempts,
16351
16324
  });
16352
16325
  return policy;
@@ -16356,7 +16329,7 @@ class DefaultConnectionRetryPolicyFactory extends ConnectionRetryPolicyFactory {
16356
16329
  var defaultConnectionRetryPolicyFactory = /*#__PURE__*/Object.freeze({
16357
16330
  __proto__: null,
16358
16331
  DefaultConnectionRetryPolicyFactory: DefaultConnectionRetryPolicyFactory,
16359
- FACTORY_META: FACTORY_META$17,
16332
+ FACTORY_META: FACTORY_META$18,
16360
16333
  default: DefaultConnectionRetryPolicyFactory
16361
16334
  });
16362
16335
 
@@ -16371,7 +16344,7 @@ class LoadBalancerStickinessManagerFactory extends AbstractResourceFactory {
16371
16344
  }
16372
16345
  }
16373
16346
 
16374
- const logger$W = getLogger('naylence.fame.sentinel.load_balancing.composite_load_balancing_strategy');
16347
+ const logger$X = getLogger('naylence.fame.sentinel.load_balancing.composite_load_balancing_strategy');
16375
16348
  class CompositeLoadBalancingStrategy {
16376
16349
  constructor(strategies) {
16377
16350
  if (!strategies.length) {
@@ -16388,7 +16361,7 @@ class CompositeLoadBalancingStrategy {
16388
16361
  try {
16389
16362
  const result = strategy.choose(poolKey, segments, envelope);
16390
16363
  if (result !== null) {
16391
- logger$W.debug('composite_strategy_success', {
16364
+ logger$X.debug('composite_strategy_success', {
16392
16365
  envelopeId: envelope.id,
16393
16366
  poolKey,
16394
16367
  strategyIndex: index,
@@ -16399,7 +16372,7 @@ class CompositeLoadBalancingStrategy {
16399
16372
  }
16400
16373
  }
16401
16374
  catch (error) {
16402
- logger$W.warning('composite_strategy_error', {
16375
+ logger$X.warning('composite_strategy_error', {
16403
16376
  envelopeId: envelope.id,
16404
16377
  poolKey,
16405
16378
  strategyIndex: index,
@@ -16408,7 +16381,7 @@ class CompositeLoadBalancingStrategy {
16408
16381
  });
16409
16382
  }
16410
16383
  }
16411
- logger$W.debug('composite_strategy_all_failed', {
16384
+ logger$X.debug('composite_strategy_all_failed', {
16412
16385
  envelopeId: envelope.id,
16413
16386
  poolKey,
16414
16387
  strategyCount: this.strategies.length,
@@ -16417,7 +16390,7 @@ class CompositeLoadBalancingStrategy {
16417
16390
  }
16418
16391
  }
16419
16392
 
16420
- const logger$V = getLogger('naylence.fame.sentinel.load_balancing.sticky_load_balancing_strategy');
16393
+ const logger$W = getLogger('naylence.fame.sentinel.load_balancing.sticky_load_balancing_strategy');
16421
16394
  class StickyLoadBalancingStrategy {
16422
16395
  constructor(stickinessManager) {
16423
16396
  this.lastChosenReplica = null;
@@ -16432,7 +16405,7 @@ class StickyLoadBalancingStrategy {
16432
16405
  }
16433
16406
  const stickyReplica = this.stickinessManager.getStickyReplicaSegment(envelope, segments);
16434
16407
  if (stickyReplica && segments.includes(stickyReplica)) {
16435
- logger$V.debug('routing_via_stickiness', {
16408
+ logger$W.debug('routing_via_stickiness', {
16436
16409
  envelopeId: envelope.id,
16437
16410
  poolKey,
16438
16411
  replicaId: stickyReplica,
@@ -16442,7 +16415,7 @@ class StickyLoadBalancingStrategy {
16442
16415
  this.lastChosenReplica = stickyReplica;
16443
16416
  return stickyReplica;
16444
16417
  }
16445
- logger$V.debug('no_stickiness_match_fallback', {
16418
+ logger$W.debug('no_stickiness_match_fallback', {
16446
16419
  envelopeId: envelope.id,
16447
16420
  poolKey,
16448
16421
  aftPresent: Boolean(envelope.aft),
@@ -16530,7 +16503,7 @@ class RouteStoreFactory extends AbstractResourceFactory {
16530
16503
  return store ?? null;
16531
16504
  }
16532
16505
  }
16533
- const FACTORY_META$16 = {
16506
+ const FACTORY_META$17 = {
16534
16507
  base: ROUTE_STORE_FACTORY_BASE_TYPE,
16535
16508
  key: 'InMemoryRouteStore',
16536
16509
  };
@@ -16548,7 +16521,7 @@ class InMemoryRouteStoreFactory extends RouteStoreFactory {
16548
16521
 
16549
16522
  var routeStoreFactory = /*#__PURE__*/Object.freeze({
16550
16523
  __proto__: null,
16551
- FACTORY_META: FACTORY_META$16,
16524
+ FACTORY_META: FACTORY_META$17,
16552
16525
  InMemoryRouteStoreFactory: InMemoryRouteStoreFactory,
16553
16526
  ROUTE_STORE_FACTORY_BASE_TYPE: ROUTE_STORE_FACTORY_BASE_TYPE,
16554
16527
  RouteStoreFactory: RouteStoreFactory,
@@ -16780,7 +16753,7 @@ function resolveRecordArray(primary, secondary) {
16780
16753
  return pickRecordArray(candidate) ?? undefined;
16781
16754
  }
16782
16755
 
16783
- const logger$U = getLogger('naylence.fame.sentinel.route_manager');
16756
+ const logger$V = getLogger('naylence.fame.sentinel.route_manager');
16784
16757
  const DEFAULT_CONNECTOR_CLEANUP_DELAY_MS$1 = 200;
16785
16758
  function normalizeRouteManagerOptions(options) {
16786
16759
  const { route_store, get_id, cleanup_delay_ms, retain_address_bindings_on_disconnect, ...rest } = options;
@@ -16864,7 +16837,7 @@ class RouteManager extends TaskSpawner {
16864
16837
  await this.safeStop(entry.connector);
16865
16838
  }
16866
16839
  catch (error) {
16867
- logger$U.debug('pending_route_stop_failed', {
16840
+ logger$V.debug('pending_route_stop_failed', {
16868
16841
  error: error instanceof Error ? error.message : String(error),
16869
16842
  });
16870
16843
  }
@@ -16887,7 +16860,7 @@ class RouteManager extends TaskSpawner {
16887
16860
  this.cancelPendingCleanup(segment);
16888
16861
  this.downstreamRoutes.set(segment, route);
16889
16862
  });
16890
- logger$U.debug('registered_downstream_route', { route: segment });
16863
+ logger$V.debug('registered_downstream_route', { route: segment });
16891
16864
  }
16892
16865
  async unregisterDownstreamRoute(segment, options) {
16893
16866
  const normalizedOptions = normalizeRouteRemovalOptions(options);
@@ -16903,7 +16876,7 @@ class RouteManager extends TaskSpawner {
16903
16876
  this.cancelPendingCleanup(segment);
16904
16877
  this._peer_routes.set(segment, route);
16905
16878
  });
16906
- logger$U.debug('registered_peer_route', { route: segment });
16879
+ logger$V.debug('registered_peer_route', { route: segment });
16907
16880
  }
16908
16881
  async unregisterPeerRoute(segment, options) {
16909
16882
  const normalizedOptions = normalizeRouteRemovalOptions(options);
@@ -16921,11 +16894,11 @@ class RouteManager extends TaskSpawner {
16921
16894
  await Promise.all(entryTuples.map(async ([segment, entry]) => {
16922
16895
  const normalized = this.normalizeEntry(entry);
16923
16896
  if (!normalized.connectorConfig) {
16924
- logger$U.warning('route_restore_missing_config', { segment });
16897
+ logger$V.warning('route_restore_missing_config', { segment });
16925
16898
  return;
16926
16899
  }
16927
16900
  if (normalized.attachExpiresAt && normalized.attachExpiresAt < now) {
16928
- logger$U.debug('skipping_expired_route', { segment });
16901
+ logger$V.debug('skipping_expired_route', { segment });
16929
16902
  return;
16930
16903
  }
16931
16904
  const authorization = this.parseAuthorization(normalized.metadata);
@@ -16958,7 +16931,7 @@ class RouteManager extends TaskSpawner {
16958
16931
  }
16959
16932
  catch (error) {
16960
16933
  if (this.isTransientError(error)) {
16961
- logger$U.warning('transient_restore_failure', {
16934
+ logger$V.warning('transient_restore_failure', {
16962
16935
  segment,
16963
16936
  attempt,
16964
16937
  error: error instanceof Error ? error.message : String(error),
@@ -16967,7 +16940,7 @@ class RouteManager extends TaskSpawner {
16967
16940
  backoff *= 2;
16968
16941
  continue;
16969
16942
  }
16970
- logger$U.error('failed_to_restore_route', {
16943
+ logger$V.error('failed_to_restore_route', {
16971
16944
  segment,
16972
16945
  error: error instanceof Error ? error.message : String(error),
16973
16946
  });
@@ -16996,13 +16969,13 @@ class RouteManager extends TaskSpawner {
16996
16969
  await this._downstream_route_store
16997
16970
  .delete(segment)
16998
16971
  .catch((error) => {
16999
- logger$U.warning('route_expiration_delete_failed', {
16972
+ logger$V.warning('route_expiration_delete_failed', {
17000
16973
  segment,
17001
16974
  error: error instanceof Error ? error.message : String(error),
17002
16975
  });
17003
16976
  });
17004
16977
  this.purgeRouteReferences(segment);
17005
- logger$U.debug('expired_route', { route: segment });
16978
+ logger$V.debug('expired_route', { route: segment });
17006
16979
  }
17007
16980
  async removeDownstreamRoute(segment, options) {
17008
16981
  const normalizedOptions = normalizeRouteRemovalOptions(options);
@@ -17060,7 +17033,7 @@ class RouteManager extends TaskSpawner {
17060
17033
  this.purgeRouteReferences(segment);
17061
17034
  }
17062
17035
  await store.delete(segment).catch((error) => {
17063
- logger$U.warning('route_delete_failed', {
17036
+ logger$V.warning('route_delete_failed', {
17064
17037
  segment,
17065
17038
  error: error instanceof Error ? error.message : String(error),
17066
17039
  });
@@ -17079,7 +17052,7 @@ class RouteManager extends TaskSpawner {
17079
17052
  caller_stack: captureStack ? captureCallerStack() : undefined,
17080
17053
  retained_addresses: retainAddresses,
17081
17054
  };
17082
- logger$U.debug('removed_route', removalMeta);
17055
+ logger$V.debug('removed_route', removalMeta);
17083
17056
  }
17084
17057
  purgeRouteReferences(segment) {
17085
17058
  for (const [address, info] of this._downstream_addresses_routes.entries()) {
@@ -17134,10 +17107,10 @@ class RouteManager extends TaskSpawner {
17134
17107
  }
17135
17108
  catch (error) {
17136
17109
  if (combined.signal.aborted) {
17137
- logger$U.debug('connector_cleanup_cancelled', { segment });
17110
+ logger$V.debug('connector_cleanup_cancelled', { segment });
17138
17111
  }
17139
17112
  else {
17140
- logger$U.debug('connector_cleanup_delay_failed', {
17113
+ logger$V.debug('connector_cleanup_delay_failed', {
17141
17114
  segment,
17142
17115
  error: error instanceof Error ? error.message : String(error),
17143
17116
  });
@@ -17160,7 +17133,7 @@ class RouteManager extends TaskSpawner {
17160
17133
  }
17161
17134
  catch (error) {
17162
17135
  if (error instanceof Error) {
17163
- logger$U.debug('connector_stop_ignored', { error: error.message });
17136
+ logger$V.debug('connector_stop_ignored', { error: error.message });
17164
17137
  }
17165
17138
  }
17166
17139
  for (const [flowId, peer] of this.flowRoutes.entries()) {
@@ -17185,12 +17158,12 @@ class RouteManager extends TaskSpawner {
17185
17158
  }
17186
17159
  }
17187
17160
  catch (error) {
17188
- logger$U.error('janitor_loop_error', {
17161
+ logger$V.error('janitor_loop_error', {
17189
17162
  error: error instanceof Error ? error.message : String(error),
17190
17163
  });
17191
17164
  }
17192
17165
  finally {
17193
- logger$U.debug('janitor_loop_exited');
17166
+ logger$V.debug('janitor_loop_exited');
17194
17167
  }
17195
17168
  }
17196
17169
  async scanStoreForExpirations(store, now, kind) {
@@ -17210,13 +17183,13 @@ class RouteManager extends TaskSpawner {
17210
17183
  }
17211
17184
  });
17212
17185
  await store.delete(segment).catch((error) => {
17213
- logger$U.warning('route_auto_expire_delete_failed', {
17186
+ logger$V.warning('route_auto_expire_delete_failed', {
17214
17187
  segment,
17215
17188
  error: error instanceof Error ? error.message : String(error),
17216
17189
  });
17217
17190
  });
17218
17191
  this.purgeRouteReferences(segment);
17219
- logger$U.debug('auto_expired_route', { segment });
17192
+ logger$V.debug('auto_expired_route', { segment });
17220
17193
  }));
17221
17194
  }
17222
17195
  parseAuthorization(metadata) {
@@ -17239,7 +17212,7 @@ class RouteManager extends TaskSpawner {
17239
17212
  return { ...base, ...extraFields };
17240
17213
  }
17241
17214
  catch (error) {
17242
- logger$U.error('corrupt_route_metadata', {
17215
+ logger$V.error('corrupt_route_metadata', {
17243
17216
  error: error instanceof Error ? error.message : String(error),
17244
17217
  });
17245
17218
  return null;
@@ -17315,12 +17288,12 @@ function captureCallerStack(skip = 3, depth = 6) {
17315
17288
  return frames.map((frame) => frame.trim()).join(' | ');
17316
17289
  }
17317
17290
 
17318
- const logger$T = getLogger('naylence.fame.sentinel.router');
17291
+ const logger$U = getLogger('naylence.fame.sentinel.router');
17319
17292
  const ZERO_EPH_PUB_BASE64 = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=';
17320
17293
  class Drop {
17321
17294
  async execute(envelope, router, state, context) {
17322
17295
  await emitDeliveryNack(envelope, router, state, 'NO_ROUTE', context ?? undefined);
17323
- logger$T.debug('dropped_envelope', Object.assign(summarizeEnvelope(envelope, ''), {
17296
+ logger$U.debug('dropped_envelope', Object.assign(summarizeEnvelope(envelope, ''), {
17324
17297
  localAddresses: Array.from(state.local.values()),
17325
17298
  downstreamRoutes: Array.from(state.downstreamAddressRoutes.entries()),
17326
17299
  peerRoutes: Array.from(state.peerAddressRoutes.entries()),
@@ -17350,7 +17323,7 @@ class ForwardChild {
17350
17323
  }
17351
17324
  catch (error) {
17352
17325
  if (error instanceof FameTransportClose) {
17353
- logger$T.error('transport_closed_forward_child', {
17326
+ logger$U.error('transport_closed_forward_child', {
17354
17327
  segment: this.segment,
17355
17328
  error: error.message,
17356
17329
  });
@@ -17382,7 +17355,7 @@ class ForwardPeer {
17382
17355
  }
17383
17356
  catch (error) {
17384
17357
  if (error instanceof FameTransportClose) {
17385
- logger$T.error('transport_closed_forward_peer', {
17358
+ logger$U.error('transport_closed_forward_peer', {
17386
17359
  segment: this.segment,
17387
17360
  error: error.message,
17388
17361
  });
@@ -17417,7 +17390,7 @@ class Deny {
17417
17390
  async execute(envelope, router, state, context) {
17418
17391
  const { internalReason, deniedAction, matchedRule, context: extraContext, disclosure = 'opaque', } = this.options;
17419
17392
  // Log detailed denial internally
17420
- logger$T.warning('route_authorization_denied', {
17393
+ logger$U.warning('route_authorization_denied', {
17421
17394
  envp_id: envelope.id,
17422
17395
  frame_type: envelope.frame?.type ?? null,
17423
17396
  to: envelope.to?.toString() ?? null,
@@ -17463,7 +17436,7 @@ function mapRoutingActionToAuthorizationAction(action) {
17463
17436
  return null;
17464
17437
  }
17465
17438
  // Unknown RoutingAction: return null, caller should deny by default
17466
- logger$T.warning('unknown_routing_action_for_authorization', {
17439
+ logger$U.warning('unknown_routing_action_for_authorization', {
17467
17440
  action_type: action?.constructor?.name ?? 'unknown',
17468
17441
  });
17469
17442
  return null;
@@ -17496,7 +17469,7 @@ async function emitDeliveryNack(envelope, routingNode, state, code, context) {
17496
17469
  return;
17497
17470
  }
17498
17471
  if (!state.envelopeFactory) {
17499
- logger$T.warning('router_missing_envelope_factory', summarizeEnvelope(envelope));
17472
+ logger$U.warning('router_missing_envelope_factory', summarizeEnvelope(envelope));
17500
17473
  return;
17501
17474
  }
17502
17475
  const nackFrame = createNackFrame(envelope, code);
@@ -17527,7 +17500,7 @@ async function emitDeliveryNack(envelope, routingNode, state, code, context) {
17527
17500
  }
17528
17501
  }
17529
17502
  catch (error) {
17530
- logger$T.warning('nack_forward_failed', {
17503
+ logger$U.warning('nack_forward_failed', {
17531
17504
  error: error instanceof Error ? error.message : String(error),
17532
17505
  ...summarizeEnvelope(envelope),
17533
17506
  });
@@ -17733,7 +17706,7 @@ class HRWLoadBalancingStrategy {
17733
17706
  }
17734
17707
  }
17735
17708
 
17736
- const logger$S = getLogger('naylence.fame.sentinel.capability_aware_routing_policy');
17709
+ const logger$T = getLogger('naylence.fame.sentinel.capability_aware_routing_policy');
17737
17710
  function normalizeOptions$i(options) {
17738
17711
  if (!options || typeof options !== 'object') {
17739
17712
  return {};
@@ -17785,7 +17758,7 @@ class CapabilityAwareRoutingPolicy {
17785
17758
  if (chosenSegment) {
17786
17759
  return new ForwardChild(chosenSegment);
17787
17760
  }
17788
- logger$S.warning('capability_policy_lb_failed', {
17761
+ logger$T.warning('capability_policy_lb_failed', {
17789
17762
  segments: providerSegments,
17790
17763
  capabilities,
17791
17764
  ...summarizeEnvelope(envelope),
@@ -17814,7 +17787,7 @@ class CapabilityAwareRoutingPolicy {
17814
17787
  }
17815
17788
  }
17816
17789
  catch (error) {
17817
- logger$S.warning('capability_policy_resolve_failed', {
17790
+ logger$T.warning('capability_policy_resolve_failed', {
17818
17791
  error: error instanceof Error ? error.message : String(error),
17819
17792
  });
17820
17793
  }
@@ -18051,7 +18024,7 @@ function toFameAddress(address) {
18051
18024
  return address instanceof FameAddress ? address : new FameAddress(address);
18052
18025
  }
18053
18026
 
18054
- const logger$R = getLogger('naylence.fame.sentinel.node_attach_frame_handler');
18027
+ const logger$S = getLogger('naylence.fame.sentinel.node_attach_frame_handler');
18055
18028
  const DOWNSTREAM_ORIGINS = new Set([
18056
18029
  DeliveryOriginType.DOWNSTREAM,
18057
18030
  DeliveryOriginType.PEER,
@@ -18144,7 +18117,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18144
18117
  this.maxTtlSec = options.maxTtlSec ?? null;
18145
18118
  }
18146
18119
  async acceptNodeAttach(envelope, context) {
18147
- logger$R.debug('handling_node_attach_request');
18120
+ logger$S.debug('handling_node_attach_request');
18148
18121
  const normalizedContext = this.normalizeContext(context);
18149
18122
  const frame = this.normalizeNodeAttachFrame(envelope.frame);
18150
18123
  if (frame.type !== 'NodeAttach') {
@@ -18189,14 +18162,14 @@ class NodeAttachFrameHandler extends TaskSpawner {
18189
18162
  let isRebind = false;
18190
18163
  if (frame.originType === DeliveryOriginType.DOWNSTREAM) {
18191
18164
  const hasExistingRoute = this.routeManager.downstreamRoutes.has(attachedSystemId);
18192
- logger$R.debug('checking_for_existing_route', {
18165
+ logger$S.debug('checking_for_existing_route', {
18193
18166
  system_id: attachedSystemId,
18194
18167
  has_existing: hasExistingRoute,
18195
18168
  existing_routes: Array.from(this.routeManager.downstreamRoutes.keys()),
18196
18169
  });
18197
18170
  if (hasExistingRoute) {
18198
18171
  isRebind = true;
18199
- logger$R.warning('rebinding_existing_downstream_route', {
18172
+ logger$S.warning('rebinding_existing_downstream_route', {
18200
18173
  system_id: attachedSystemId,
18201
18174
  });
18202
18175
  oldAssignedPath = buildAssignedPath$1(this.routingNode.physicalPath, attachedSystemId);
@@ -18215,7 +18188,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18215
18188
  meta: { systemId: attachedSystemId },
18216
18189
  })
18217
18190
  .catch((error) => {
18218
- logger$R.warning('failed_to_unregister_downstream_route_before_rebind', {
18191
+ logger$S.warning('failed_to_unregister_downstream_route_before_rebind', {
18219
18192
  system_id: attachedSystemId,
18220
18193
  error: error instanceof Error ? error.message : String(error),
18221
18194
  });
@@ -18232,7 +18205,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18232
18205
  for (const address of orphanedAddresses) {
18233
18206
  encryptionMgr.clearChannelCacheForDestination(address);
18234
18207
  }
18235
- logger$R.debug('cleared_channel_cache_for_rebind', {
18208
+ logger$S.debug('cleared_channel_cache_for_rebind', {
18236
18209
  system_id: attachedSystemId,
18237
18210
  addresses: orphanedAddresses,
18238
18211
  });
@@ -18244,7 +18217,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18244
18217
  encryptionMgr.removeChannelsForDestination(address);
18245
18218
  }
18246
18219
  if (totalRemoved > 0) {
18247
- logger$R.debug('removed_channel_states_for_rebind', {
18220
+ logger$S.debug('removed_channel_states_for_rebind', {
18248
18221
  system_id: attachedSystemId,
18249
18222
  channels_removed: totalRemoved,
18250
18223
  });
@@ -18252,7 +18225,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18252
18225
  }
18253
18226
  }
18254
18227
  catch (error) {
18255
- logger$R.warning('failed_to_cleanup_channels_for_rebind', {
18228
+ logger$S.warning('failed_to_cleanup_channels_for_rebind', {
18256
18229
  system_id: attachedSystemId,
18257
18230
  error: error instanceof Error ? error.message : String(error),
18258
18231
  });
@@ -18275,7 +18248,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18275
18248
  meta: { systemId: attachedSystemId },
18276
18249
  })
18277
18250
  .catch((error) => {
18278
- logger$R.warning('failed_to_unregister_peer_route_before_rebind', {
18251
+ logger$S.warning('failed_to_unregister_peer_route_before_rebind', {
18279
18252
  system_id: attachedSystemId,
18280
18253
  error: error instanceof Error ? error.message : String(error),
18281
18254
  });
@@ -18313,7 +18286,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18313
18286
  ? { stickiness: negotiatedStickiness }
18314
18287
  : {}),
18315
18288
  });
18316
- logger$R.debug('sending_node_attach_ack', {
18289
+ logger$S.debug('sending_node_attach_ack', {
18317
18290
  env_id: ackEnvelope.id ?? 'unknown',
18318
18291
  });
18319
18292
  await this.sendAndNotify(connector, ackEnvelope, attachedSystemId, normalizedContext);
@@ -18360,7 +18333,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18360
18333
  return this.stickinessManager.negotiate(stickiness);
18361
18334
  }
18362
18335
  catch (error) {
18363
- logger$R.debug('stickiness_negotiate_skipped', {
18336
+ logger$S.debug('stickiness_negotiate_skipped', {
18364
18337
  error: error instanceof Error ? error.message : String(error),
18365
18338
  });
18366
18339
  return null;
@@ -18376,13 +18349,13 @@ class NodeAttachFrameHandler extends TaskSpawner {
18376
18349
  }
18377
18350
  if (!attachExpiresAt || earliestKeyExpiry < attachExpiresAt) {
18378
18351
  if (attachExpiresAt) {
18379
- logger$R.warning('attachment_ttl_limited_by_key_expiry', {
18352
+ logger$S.warning('attachment_ttl_limited_by_key_expiry', {
18380
18353
  limited_attach_expires_at: earliestKeyExpiry.toISOString(),
18381
18354
  original_attach_expires_at: attachExpiresAt.toISOString(),
18382
18355
  });
18383
18356
  }
18384
18357
  else {
18385
- logger$R.debug('attachment_ttl_set_by_key_expiry', {
18358
+ logger$S.debug('attachment_ttl_set_by_key_expiry', {
18386
18359
  attach_expires_at: earliestKeyExpiry.toISOString(),
18387
18360
  reason: 'no_max_ttl_configured',
18388
18361
  });
@@ -18393,7 +18366,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18393
18366
  }
18394
18367
  async validateAttachmentKeys(frame, envelope, connector, context, systemId) {
18395
18368
  if (!this.attachmentKeyValidator) {
18396
- logger$R.debug('child_key_validation_skipped', {
18369
+ logger$S.debug('child_key_validation_skipped', {
18397
18370
  child_id: systemId,
18398
18371
  reason: 'no_validator',
18399
18372
  });
@@ -18409,7 +18382,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18409
18382
  }
18410
18383
  }
18411
18384
  if (keyInfos.length > 0) {
18412
- logger$R.debug('node_attach_key_validation_passed', {
18385
+ logger$S.debug('node_attach_key_validation_passed', {
18413
18386
  system_id: systemId,
18414
18387
  instance_id: frame.instanceId,
18415
18388
  correlation_id: envelope.corrId,
@@ -18429,13 +18402,13 @@ class NodeAttachFrameHandler extends TaskSpawner {
18429
18402
  reason: `Certificate validation failed: ${error.message}`,
18430
18403
  });
18431
18404
  await this.sendAndNotify(connector, rejectionAck, systemId, context).catch((sendError) => {
18432
- logger$R.error('failed_sending_negative_attach_ack', {
18405
+ logger$S.error('failed_sending_negative_attach_ack', {
18433
18406
  error: sendError instanceof Error
18434
18407
  ? sendError.message
18435
18408
  : String(sendError),
18436
18409
  });
18437
18410
  });
18438
- logger$R.error('node_attach_key_validation_failed', {
18411
+ logger$S.error('node_attach_key_validation_failed', {
18439
18412
  system_id: systemId,
18440
18413
  instance_id: frame.instanceId,
18441
18414
  correlation_id: envelope.corrId,
@@ -18501,10 +18474,10 @@ class NodeAttachFrameHandler extends TaskSpawner {
18501
18474
  try {
18502
18475
  await delay(delaySeconds * 1000);
18503
18476
  await connector.close(1008, 'attach-unauthorized');
18504
- logger$R.debug('closed_unauthorized_connection');
18477
+ logger$S.debug('closed_unauthorized_connection');
18505
18478
  }
18506
18479
  catch (error) {
18507
- logger$R.error('failed_to_close_unauthorized_connection', {
18480
+ logger$S.error('failed_to_close_unauthorized_connection', {
18508
18481
  error: error instanceof Error ? error.message : String(error),
18509
18482
  });
18510
18483
  }
@@ -18617,7 +18590,7 @@ class NodeAttachFrameHandler extends TaskSpawner {
18617
18590
  }
18618
18591
  }
18619
18592
 
18620
- const logger$Q = getLogger('naylence.fame.sentinel.address_bind_frame_handler');
18593
+ const logger$R = getLogger('naylence.fame.sentinel.address_bind_frame_handler');
18621
18594
  const RESERVED_ADDRESS_NAMES = new Set(['__sys__', '__rpc__']);
18622
18595
  function pickManagerField(manager, keys) {
18623
18596
  const record = manager;
@@ -18941,7 +18914,7 @@ class AddressBindFrameHandler {
18941
18914
  if (this.routingNode.forwardToPeers) {
18942
18915
  await this.routingNode.forwardToPeers(envelope, undefined, [sourceSystemId], context);
18943
18916
  }
18944
- logger$Q.debug('address_bound', {
18917
+ logger$R.debug('address_bound', {
18945
18918
  address: addressStr,
18946
18919
  segment: sourceSystemId,
18947
18920
  });
@@ -19039,7 +19012,7 @@ class AddressBindFrameHandler {
19039
19012
  }
19040
19013
  await this.routingNode.forwardToRoute(sourceSystemId, ackEnvelope, ackContext);
19041
19014
  }
19042
- logger$Q.debug('address_unbound', {
19015
+ logger$R.debug('address_unbound', {
19043
19016
  address: addressStr,
19044
19017
  segment: sourceSystemId,
19045
19018
  });
@@ -19057,7 +19030,7 @@ class AddressBindFrameHandler {
19057
19030
  }
19058
19031
  }
19059
19032
 
19060
- const logger$P = getLogger('naylence.fame.sentinel.node_heartbeat_frame_handler');
19033
+ const logger$Q = getLogger('naylence.fame.sentinel.node_heartbeat_frame_handler');
19061
19034
  function normalizeOptions$h(options) {
19062
19035
  if (!options || typeof options !== 'object') {
19063
19036
  throw new Error('NodeHeartbeatFrameHandler requires a routingNode option');
@@ -19094,7 +19067,7 @@ class NodeHeartbeatFrameHandler {
19094
19067
  if (!frame || frame.type !== 'NodeHeartbeat') {
19095
19068
  throw new Error(`Invalid envelope frame. Expected: NodeHeartbeatFrame, actual: ${frame?.type ?? 'unknown'}`);
19096
19069
  }
19097
- logger$P.trace('handling_heartbeat', {
19070
+ logger$Q.trace('handling_heartbeat', {
19098
19071
  hb_system_id: frame.systemId ?? 'unknown',
19099
19072
  hb_env_id: envelope.id ?? 'unknown',
19100
19073
  hb_corr_id: envelope.corrId ?? 'unknown',
@@ -19122,7 +19095,7 @@ class NodeHeartbeatFrameHandler {
19122
19095
  ...(envelope.corrId ? { corrId: envelope.corrId } : {}),
19123
19096
  ...(envelope.traceId ? { traceId: envelope.traceId } : {}),
19124
19097
  });
19125
- logger$P.debug('sending_heartbeat_ack', {
19098
+ logger$Q.debug('sending_heartbeat_ack', {
19126
19099
  hb_ack_env_id: ackEnvelope.id ?? 'unknown',
19127
19100
  hb_ack_corr_id: ackEnvelope.corrId ?? 'unknown',
19128
19101
  });
@@ -19150,7 +19123,7 @@ class NodeHeartbeatFrameHandler {
19150
19123
  }
19151
19124
  }
19152
19125
 
19153
- const logger$O = getLogger('naylence.fame.sentinel.capability_frame_handler');
19126
+ const logger$P = getLogger('naylence.fame.sentinel.capability_frame_handler');
19154
19127
  class CapabilityFrameHandler {
19155
19128
  constructor(options) {
19156
19129
  this.capabilityRoutes = new Map();
@@ -19177,7 +19150,7 @@ class CapabilityFrameHandler {
19177
19150
  const segment = this.getSourceSystemId(context);
19178
19151
  const downstreamRoutes = getDownstreamRoutes(this.routeManager);
19179
19152
  if (!segment || !hasRoute(downstreamRoutes, segment)) {
19180
- logger$O.debug('capability_advertise_unknown_segment', { segment });
19153
+ logger$P.debug('capability_advertise_unknown_segment', { segment });
19181
19154
  return;
19182
19155
  }
19183
19156
  const addressKey = this.normalizeAddress(frame.address);
@@ -19210,7 +19183,7 @@ class CapabilityFrameHandler {
19210
19183
  }
19211
19184
  const segment = this.getSourceSystemId(context);
19212
19185
  if (!segment) {
19213
- logger$O.debug('capability_withdraw_missing_segment');
19186
+ logger$P.debug('capability_withdraw_missing_segment');
19214
19187
  return;
19215
19188
  }
19216
19189
  const addressKey = this.normalizeAddress(frame.address);
@@ -19264,7 +19237,7 @@ class CapabilityFrameHandler {
19264
19237
  async forwardAckToSegment(segment, ackFrame, originalEnvelope, ackContext) {
19265
19238
  const envelopeFactory = this.routingNode.envelopeFactory;
19266
19239
  if (!envelopeFactory) {
19267
- logger$O.warning('missing_envelope_factory_for_capability_ack');
19240
+ logger$P.warning('missing_envelope_factory_for_capability_ack');
19268
19241
  return;
19269
19242
  }
19270
19243
  const ackEnvelope = envelopeFactory.createEnvelope({
@@ -19327,7 +19300,7 @@ function getStickySid(context) {
19327
19300
  return typed.stickySid ?? typed.sticky_sid ?? undefined;
19328
19301
  }
19329
19302
 
19330
- const logger$N = getLogger('naylence.fame.sentinel.credit_update_frame_handler');
19303
+ const logger$O = getLogger('naylence.fame.sentinel.credit_update_frame_handler');
19331
19304
  function normalizeOptions$g(options) {
19332
19305
  if (!options || typeof options !== 'object') {
19333
19306
  throw new Error('CreditUpdateFrameHandler requires a routeManager option');
@@ -19347,12 +19320,12 @@ class CreditUpdateFrameHandler {
19347
19320
  async acceptCreditUpdate(envelope, context) {
19348
19321
  const flowId = envelope.flowId;
19349
19322
  if (!flowId) {
19350
- logger$N.warning('credit_update_missing_flow_id');
19323
+ logger$O.warning('credit_update_missing_flow_id');
19351
19324
  return;
19352
19325
  }
19353
19326
  const targetConnector = this.routeManager.getFlowRoute(flowId);
19354
19327
  if (!targetConnector) {
19355
- logger$N.warning('credit_update_unknown_flow', { flowId });
19328
+ logger$O.warning('credit_update_unknown_flow', { flowId });
19356
19329
  return;
19357
19330
  }
19358
19331
  if (context?.fromConnector && context.fromConnector === targetConnector) {
@@ -19362,7 +19335,7 @@ class CreditUpdateFrameHandler {
19362
19335
  }
19363
19336
  }
19364
19337
 
19365
- const logger$M = getLogger('naylence.fame.sentinel.sentinel');
19338
+ const logger$N = getLogger('naylence.fame.sentinel.sentinel');
19366
19339
  const ALLOWED_BEFORE_ATTACH = new Set(['NodeAttach']);
19367
19340
  const SYSTEM_INBOX = '__sys__';
19368
19341
  const RESERVED_UPSTREAM_ADDRESS_NAMES = new Set(['__sys__', '__rpc__']);
@@ -19456,7 +19429,7 @@ class Sentinel extends FameNode {
19456
19429
  routeStore = createPersistentRouteStore(this.storageProvider);
19457
19430
  }
19458
19431
  catch (error) {
19459
- logger$M.warning('persistent_route_store_unavailable', {
19432
+ logger$N.warning('persistent_route_store_unavailable', {
19460
19433
  error: error instanceof Error ? error.message : String(error),
19461
19434
  });
19462
19435
  routeStore = getDefaultRouteStore();
@@ -19538,7 +19511,7 @@ class Sentinel extends FameNode {
19538
19511
  bumpRoutingEpoch() {
19539
19512
  const previousEpoch = this.routingEpochValue;
19540
19513
  this.routingEpochValue = generateId();
19541
- logger$M.debug('routing_epoch_bumped', {
19514
+ logger$N.debug('routing_epoch_bumped', {
19542
19515
  previous_epoch: previousEpoch,
19543
19516
  new_epoch: this.routingEpochValue,
19544
19517
  });
@@ -19629,7 +19602,7 @@ class Sentinel extends FameNode {
19629
19602
  }
19630
19603
  async forwardToRoute(nextSegment, envelope, context) {
19631
19604
  if (this.originMatches(context, nextSegment, DeliveryOriginType.DOWNSTREAM)) {
19632
- logger$M.debug('downstream_loop_detected', {
19605
+ logger$N.debug('downstream_loop_detected', {
19633
19606
  envp_id: envelope.id,
19634
19607
  segment: nextSegment,
19635
19608
  });
@@ -19642,14 +19615,14 @@ class Sentinel extends FameNode {
19642
19615
  }
19643
19616
  const connector = this.routeManager.downstreamRoutes.get(nextSegment);
19644
19617
  if (!connector) {
19645
- logger$M.warning('no_route_for_child_segment', { segment: nextSegment });
19618
+ logger$N.warning('no_route_for_child_segment', { segment: nextSegment });
19646
19619
  await this.emitDeliveryNack(processed, {
19647
19620
  code: 'CHILD_UNREACHABLE',
19648
19621
  context: context ?? null,
19649
19622
  });
19650
19623
  return;
19651
19624
  }
19652
- logger$M.debug('forwarding_downstream', {
19625
+ logger$N.debug('forwarding_downstream', {
19653
19626
  ...summarizeEnvelope(processed, ''),
19654
19627
  route: nextSegment,
19655
19628
  });
@@ -19666,7 +19639,7 @@ class Sentinel extends FameNode {
19666
19639
  }
19667
19640
  async forwardToPeer(peerSegment, envelope, context) {
19668
19641
  if (this.originMatches(context, peerSegment, DeliveryOriginType.PEER)) {
19669
- logger$M.debug('peer_loop_detected', {
19642
+ logger$N.debug('peer_loop_detected', {
19670
19643
  envp_id: envelope.id,
19671
19644
  segment: peerSegment,
19672
19645
  });
@@ -19677,7 +19650,7 @@ class Sentinel extends FameNode {
19677
19650
  }
19678
19651
  const connector = this.routeManager._peer_routes.get(peerSegment);
19679
19652
  if (!connector) {
19680
- logger$M.warning('no_route_for_peer_segment', {
19653
+ logger$N.warning('no_route_for_peer_segment', {
19681
19654
  peer_segment: peerSegment,
19682
19655
  });
19683
19656
  await this.emitDeliveryNack(processed, {
@@ -19720,7 +19693,7 @@ class Sentinel extends FameNode {
19720
19693
  }
19721
19694
  async forwardUpstream(envelope, context) {
19722
19695
  if (context?.originType === DeliveryOriginType.UPSTREAM) {
19723
- logger$M.debug('skipping_forward_upstream', {
19696
+ logger$N.debug('skipping_forward_upstream', {
19724
19697
  envp_id: envelope.id,
19725
19698
  origin_type: context.originType,
19726
19699
  });
@@ -19840,7 +19813,7 @@ class Sentinel extends FameNode {
19840
19813
  }
19841
19814
  catch (error) {
19842
19815
  if (!combined.signal.aborted) {
19843
- logger$M.debug('attach_timeout_delay_failed', {
19816
+ logger$N.debug('attach_timeout_delay_failed', {
19844
19817
  system_id: systemId,
19845
19818
  error: error instanceof Error ? error.message : String(error),
19846
19819
  });
@@ -19867,12 +19840,12 @@ class Sentinel extends FameNode {
19867
19840
  await connector.stop();
19868
19841
  }
19869
19842
  catch (error) {
19870
- logger$M.debug('attach_timeout_stop_failed', {
19843
+ logger$N.debug('attach_timeout_stop_failed', {
19871
19844
  system_id: systemId,
19872
19845
  error: error instanceof Error ? error.message : String(error),
19873
19846
  });
19874
19847
  }
19875
- logger$M.warning('attach_timeout_expired', {
19848
+ logger$N.warning('attach_timeout_expired', {
19876
19849
  system_id: systemId,
19877
19850
  timeout_ms: timeoutMs,
19878
19851
  });
@@ -19926,7 +19899,7 @@ class Sentinel extends FameNode {
19926
19899
  return new FameAddress(addressKey);
19927
19900
  }
19928
19901
  catch (error) {
19929
- logger$M.debug('invalid_capability_address', {
19902
+ logger$N.debug('invalid_capability_address', {
19930
19903
  capability,
19931
19904
  address: addressKey,
19932
19905
  error: error instanceof Error ? error.message : String(error),
@@ -20082,7 +20055,7 @@ class Sentinel extends FameNode {
20082
20055
  }
20083
20056
  async propagateAddressBindingsUpstream() {
20084
20057
  if (!this.hasParent) {
20085
- logger$M.warning('No upstream defined to rebind addresses');
20058
+ logger$N.warning('No upstream defined to rebind addresses');
20086
20059
  return;
20087
20060
  }
20088
20061
  const entries = Array.from(this.routeManager._downstream_addresses_routes.entries());
@@ -20105,7 +20078,7 @@ class Sentinel extends FameNode {
20105
20078
  await this.bindAddressUpstream(new FameAddress(address), info);
20106
20079
  }
20107
20080
  catch (error) {
20108
- logger$M.error('rebind_failed', {
20081
+ logger$N.error('rebind_failed', {
20109
20082
  address,
20110
20083
  error: error instanceof Error ? error.message : String(error),
20111
20084
  });
@@ -20203,7 +20176,7 @@ class Sentinel extends FameNode {
20203
20176
  }
20204
20177
  catch (error) {
20205
20178
  // Hook threw => treat as denial, execute Drop
20206
- logger$M.warning('routing_action_hook_error', {
20179
+ logger$N.warning('routing_action_hook_error', {
20207
20180
  envp_id: envelope.id,
20208
20181
  error: error instanceof Error ? error.message : String(error),
20209
20182
  });
@@ -20227,7 +20200,7 @@ class Sentinel extends FameNode {
20227
20200
  }
20228
20201
  const abortSignal = signal ?? null;
20229
20202
  if (abortSignal?.aborted) {
20230
- logger$M.info('shutdown_signal_received', { signal: 'abort' });
20203
+ logger$N.info('shutdown_signal_received', { signal: 'abort' });
20231
20204
  return;
20232
20205
  }
20233
20206
  // Build fabric options, preferring rootConfig if provided
@@ -20243,7 +20216,7 @@ class Sentinel extends FameNode {
20243
20216
  if (node !== null) {
20244
20217
  fabricCreateOptions.node = node;
20245
20218
  }
20246
- logger$M.debug('fabric_create_options', {
20219
+ logger$N.debug('fabric_create_options', {
20247
20220
  hasRootConfig: 'rootConfig' in fabricCreateOptions,
20248
20221
  hasNode: 'node' in fabricCreateOptions,
20249
20222
  rootConfigKeys: fabricCreateOptions.rootConfig
@@ -20276,7 +20249,7 @@ class Sentinel extends FameNode {
20276
20249
  const registerSignalListeners = () => {
20277
20250
  for (const sig of signals) {
20278
20251
  const listener = () => {
20279
- logger$M.info('shutdown_signal_received', { signal: sig });
20252
+ logger$N.info('shutdown_signal_received', { signal: sig });
20280
20253
  cleanupListeners();
20281
20254
  stopResolve();
20282
20255
  };
@@ -20285,7 +20258,7 @@ class Sentinel extends FameNode {
20285
20258
  }
20286
20259
  if (abortSignal) {
20287
20260
  abortListener = () => {
20288
- logger$M.info('shutdown_signal_received', { signal: 'abort' });
20261
+ logger$N.info('shutdown_signal_received', { signal: 'abort' });
20289
20262
  cleanupListeners();
20290
20263
  stopResolve();
20291
20264
  };
@@ -20298,12 +20271,12 @@ class Sentinel extends FameNode {
20298
20271
  await providedFabric.enter();
20299
20272
  try {
20300
20273
  registerSignalListeners();
20301
- logger$M.info('sentinel_live', {
20274
+ logger$N.info('sentinel_live', {
20302
20275
  message: 'Node is live! Press Ctrl+C to stop.',
20303
20276
  });
20304
20277
  try {
20305
20278
  await stopPromise;
20306
- logger$M.info('sentinel_shutdown_begin');
20279
+ logger$N.info('sentinel_shutdown_begin');
20307
20280
  }
20308
20281
  finally {
20309
20282
  cleanupListeners();
@@ -20317,19 +20290,19 @@ class Sentinel extends FameNode {
20317
20290
  // Use withFabric pattern for automatic lifecycle management
20318
20291
  await withFabric(fabricCreateOptions, async () => {
20319
20292
  registerSignalListeners();
20320
- logger$M.info('sentinel_live', {
20293
+ logger$N.info('sentinel_live', {
20321
20294
  message: 'Node is live! Press Ctrl+C to stop.',
20322
20295
  });
20323
20296
  try {
20324
20297
  await stopPromise;
20325
- logger$M.info('sentinel_shutdown_begin');
20298
+ logger$N.info('sentinel_shutdown_begin');
20326
20299
  }
20327
20300
  finally {
20328
20301
  cleanupListeners();
20329
20302
  }
20330
20303
  });
20331
20304
  }
20332
- logger$M.info('sentinel_shutdown_complete');
20305
+ logger$N.info('sentinel_shutdown_complete');
20333
20306
  }
20334
20307
  }
20335
20308
  function normalizeServeLogLevel(level) {
@@ -20474,7 +20447,7 @@ function isPlainRecord(value) {
20474
20447
  return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
20475
20448
  }
20476
20449
 
20477
- const FACTORY_META$15 = {
20450
+ const FACTORY_META$16 = {
20478
20451
  base: NODE_LIKE_FACTORY_BASE_TYPE,
20479
20452
  key: 'Sentinel',
20480
20453
  };
@@ -20658,7 +20631,7 @@ class SentinelFactory extends NodeLikeFactory {
20658
20631
 
20659
20632
  var sentinelFactory = /*#__PURE__*/Object.freeze({
20660
20633
  __proto__: null,
20661
- FACTORY_META: FACTORY_META$15,
20634
+ FACTORY_META: FACTORY_META$16,
20662
20635
  SentinelFactory: SentinelFactory,
20663
20636
  default: SentinelFactory
20664
20637
  });
@@ -20702,7 +20675,7 @@ function createConnectorConfig(config) {
20702
20675
  * A transport adapter that works with both Node.js and browser WebSocket APIs.
20703
20676
  * Supports both native WebSocket clients and server-side WebSocket connections.
20704
20677
  */
20705
- const logger$L = getLogger('naylence.fame.connector.websocket_connector');
20678
+ const logger$M = getLogger('naylence.fame.connector.websocket_connector');
20706
20679
  /**
20707
20680
  * WebSocket state constants (mirrors standard WebSocket states)
20708
20681
  */
@@ -20743,7 +20716,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20743
20716
  websocket.send_bytes &&
20744
20717
  typeof websocket.receive_bytes === 'function' &&
20745
20718
  typeof websocket.send_bytes === 'function');
20746
- logger$L.debug('websocket_connector_created', {
20719
+ logger$M.debug('websocket_connector_created', {
20747
20720
  is_fastapi_like: this._isFastApiLike,
20748
20721
  ready_state: websocket.readyState,
20749
20722
  url: websocket.url,
@@ -20758,7 +20731,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20758
20731
  socketAny.binaryType = 'arraybuffer';
20759
20732
  }
20760
20733
  catch (error) {
20761
- logger$L.debug('websocket_set_binary_type_failed', {
20734
+ logger$M.debug('websocket_set_binary_type_failed', {
20762
20735
  error: error instanceof Error ? error.message : String(error),
20763
20736
  current_type: socketAny.binaryType,
20764
20737
  });
@@ -20814,7 +20787,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20814
20787
  else {
20815
20788
  this._receiveQueue.push(data);
20816
20789
  }
20817
- logger$L.debug('websocket_message_pushed_to_queue', {
20790
+ logger$M.debug('websocket_message_pushed_to_queue', {
20818
20791
  queueLength: this._receiveQueue.length,
20819
20792
  waitersLength: this._receiveWaiters.length,
20820
20793
  });
@@ -20867,7 +20840,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20867
20840
  const result = receiveMethod.call(this._websocket);
20868
20841
  // Ensure we have a Promise
20869
20842
  if (!result || typeof result.then !== 'function') {
20870
- logger$L.error('fastapi_receive_not_awaitable', {
20843
+ logger$M.error('fastapi_receive_not_awaitable', {
20871
20844
  result_type: typeof result,
20872
20845
  result_str: String(result).substring(0, 100),
20873
20846
  });
@@ -20883,7 +20856,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20883
20856
  }
20884
20857
  // Handle known WebSocket shutdown race condition
20885
20858
  if (this._isAwaitFutureError(error)) {
20886
- logger$L.debug('websocket_shutdown_race_condition_handled', {
20859
+ logger$M.debug('websocket_shutdown_race_condition_handled', {
20887
20860
  note: 'Normal WebSocket close timing - converting to cancellation',
20888
20861
  websocket_state: this._websocket.client_state || 'unknown',
20889
20862
  });
@@ -20926,7 +20899,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20926
20899
  }
20927
20900
  catch (error) {
20928
20901
  if (this._isAwaitFutureError(error)) {
20929
- logger$L.debug('websocket_shutdown_race_condition_detected', {
20902
+ logger$M.debug('websocket_shutdown_race_condition_detected', {
20930
20903
  websocket_type: this._websocket.constructor.name,
20931
20904
  is_fastapi: this._isFastApiLike,
20932
20905
  note: 'Normal WebSocket close timing during shutdown',
@@ -20972,12 +20945,12 @@ class WebSocketConnector extends BaseAsyncConnector {
20972
20945
  if (socketAny.readyState !== WebSocketState.CLOSED) {
20973
20946
  try {
20974
20947
  socketAny.terminate();
20975
- logger$L.debug('websocket_force_terminated', {
20948
+ logger$M.debug('websocket_force_terminated', {
20976
20949
  ready_state: socketAny.readyState,
20977
20950
  });
20978
20951
  }
20979
20952
  catch (error) {
20980
- logger$L.debug('websocket_force_terminate_failed', {
20953
+ logger$M.debug('websocket_force_terminate_failed', {
20981
20954
  error: error instanceof Error ? error.message : String(error),
20982
20955
  });
20983
20956
  }
@@ -20988,7 +20961,7 @@ class WebSocketConnector extends BaseAsyncConnector {
20988
20961
  }
20989
20962
  }
20990
20963
  catch (error) {
20991
- logger$L.error('websocket_close_failed', {
20964
+ logger$M.error('websocket_close_failed', {
20992
20965
  error: error instanceof Error ? error.message : String(error),
20993
20966
  });
20994
20967
  // Don't re-throw - close errors are not critical during shutdown
@@ -21209,7 +21182,7 @@ class WebSocketConnector extends BaseAsyncConnector {
21209
21182
  this._removeReceiveHandlers();
21210
21183
  }
21211
21184
  catch (error) {
21212
- logger$L.debug('websocket_remove_handlers_failed', {
21185
+ logger$M.debug('websocket_remove_handlers_failed', {
21213
21186
  error: error instanceof Error ? error.message : String(error),
21214
21187
  });
21215
21188
  }
@@ -21261,7 +21234,7 @@ class WebSocketConnector extends BaseAsyncConnector {
21261
21234
  * Browser-local connector that routes binary frames between peers via an in-page EventTarget.
21262
21235
  * Relies on BaseAsyncConnector for flow control and shutdown behavior.
21263
21236
  */
21264
- const logger$K = getLogger('naylence.fame.connector.inpage_connector');
21237
+ const logger$L = getLogger('naylence.fame.connector.inpage_connector');
21265
21238
  const INPAGE_CONNECTOR_TYPE = 'inpage-connector';
21266
21239
  const DEFAULT_CHANNEL$6 = 'naylence-fabric';
21267
21240
  const DEFAULT_INBOX_CAPACITY$6 = 2048;
@@ -21359,7 +21332,7 @@ class InPageConnector extends BaseAsyncConnector {
21359
21332
  }
21360
21333
  this.localNodeId = normalizedLocalNodeId;
21361
21334
  this.targetNodeId = InPageConnector.normalizeTargetNodeId(config.initialTargetNodeId);
21362
- logger$K.debug('inpage_connector_initialized', {
21335
+ logger$L.debug('inpage_connector_initialized', {
21363
21336
  channel: this.channelName,
21364
21337
  connector_id: this.connectorId,
21365
21338
  local_node_id: this.localNodeId,
@@ -21368,7 +21341,7 @@ class InPageConnector extends BaseAsyncConnector {
21368
21341
  });
21369
21342
  this.onMsg = (event) => {
21370
21343
  if (!this.listenerRegistered) {
21371
- logger$K.warning('inpage_message_after_unregister', {
21344
+ logger$L.warning('inpage_message_after_unregister', {
21372
21345
  channel: this.channelName,
21373
21346
  connector_id: this.connectorId,
21374
21347
  timestamp: new Date().toISOString(),
@@ -21377,7 +21350,7 @@ class InPageConnector extends BaseAsyncConnector {
21377
21350
  }
21378
21351
  const messageEvent = event;
21379
21352
  const message = messageEvent.data;
21380
- logger$K.debug('inpage_raw_event', {
21353
+ logger$L.debug('inpage_raw_event', {
21381
21354
  channel: this.channelName,
21382
21355
  connector_id: this.connectorId,
21383
21356
  message_type: message && typeof message === 'object'
@@ -21397,7 +21370,7 @@ class InPageConnector extends BaseAsyncConnector {
21397
21370
  : null;
21398
21371
  const senderNodeId = InPageConnector.normalizeNodeId(busMessage.senderNodeId);
21399
21372
  if (!senderId || !senderNodeId) {
21400
- logger$K.debug('inpage_message_rejected', {
21373
+ logger$L.debug('inpage_message_rejected', {
21401
21374
  channel: this.channelName,
21402
21375
  connector_id: this.connectorId,
21403
21376
  reason: 'missing_sender_metadata',
@@ -21405,7 +21378,7 @@ class InPageConnector extends BaseAsyncConnector {
21405
21378
  return;
21406
21379
  }
21407
21380
  if (senderId === this.connectorId || senderNodeId === this.localNodeId) {
21408
- logger$K.debug('inpage_message_rejected', {
21381
+ logger$L.debug('inpage_message_rejected', {
21409
21382
  channel: this.channelName,
21410
21383
  connector_id: this.connectorId,
21411
21384
  reason: 'self_echo',
@@ -21419,14 +21392,14 @@ class InPageConnector extends BaseAsyncConnector {
21419
21392
  }
21420
21393
  const payload = InPageConnector.coercePayload(busMessage.payload);
21421
21394
  if (!payload) {
21422
- logger$K.debug('inpage_payload_rejected', {
21395
+ logger$L.debug('inpage_payload_rejected', {
21423
21396
  channel: this.channelName,
21424
21397
  connector_id: this.connectorId,
21425
21398
  reason: 'unrecognized_payload_type',
21426
21399
  });
21427
21400
  return;
21428
21401
  }
21429
- logger$K.debug('inpage_message_received', {
21402
+ logger$L.debug('inpage_message_received', {
21430
21403
  channel: this.channelName,
21431
21404
  sender_id: senderId,
21432
21405
  sender_node_id: senderNodeId,
@@ -21455,14 +21428,14 @@ class InPageConnector extends BaseAsyncConnector {
21455
21428
  }
21456
21429
  catch (error) {
21457
21430
  if (error instanceof QueueFullError) {
21458
- logger$K.warning('inpage_receive_queue_full', {
21431
+ logger$L.warning('inpage_receive_queue_full', {
21459
21432
  channel: this.channelName,
21460
21433
  inbox_capacity: this.inboxCapacity,
21461
21434
  inbox_remaining_capacity: this.inbox.remainingCapacity,
21462
21435
  });
21463
21436
  }
21464
21437
  else {
21465
- logger$K.error('inpage_receive_error', {
21438
+ logger$L.error('inpage_receive_error', {
21466
21439
  channel: this.channelName,
21467
21440
  error: error instanceof Error ? error.message : String(error),
21468
21441
  });
@@ -21474,7 +21447,7 @@ class InPageConnector extends BaseAsyncConnector {
21474
21447
  // Setup visibility change monitoring
21475
21448
  this.visibilityChangeHandler = () => {
21476
21449
  const isHidden = document.hidden;
21477
- logger$K.debug('inpage_visibility_changed', {
21450
+ logger$L.debug('inpage_visibility_changed', {
21478
21451
  channel: this.channelName,
21479
21452
  connector_id: this.connectorId,
21480
21453
  visibility: isHidden ? 'hidden' : 'visible',
@@ -21483,7 +21456,7 @@ class InPageConnector extends BaseAsyncConnector {
21483
21456
  // Pause/resume connector based on visibility
21484
21457
  if (isHidden && this.state === ConnectorState.STARTED) {
21485
21458
  this.pause().catch((err) => {
21486
- logger$K.warning('inpage_pause_failed', {
21459
+ logger$L.warning('inpage_pause_failed', {
21487
21460
  channel: this.channelName,
21488
21461
  connector_id: this.connectorId,
21489
21462
  error: err instanceof Error ? err.message : String(err),
@@ -21492,7 +21465,7 @@ class InPageConnector extends BaseAsyncConnector {
21492
21465
  }
21493
21466
  else if (!isHidden && this.state === ConnectorState.PAUSED) {
21494
21467
  this.resume().catch((err) => {
21495
- logger$K.warning('inpage_resume_failed', {
21468
+ logger$L.warning('inpage_resume_failed', {
21496
21469
  channel: this.channelName,
21497
21470
  connector_id: this.connectorId,
21498
21471
  error: err instanceof Error ? err.message : String(err),
@@ -21506,7 +21479,7 @@ class InPageConnector extends BaseAsyncConnector {
21506
21479
  // Track page lifecycle events to detect browser unload/discard
21507
21480
  if (typeof window !== 'undefined') {
21508
21481
  const lifecycleLogger = (event) => {
21509
- logger$K.info('inpage_page_lifecycle', {
21482
+ logger$L.info('inpage_page_lifecycle', {
21510
21483
  channel: this.channelName,
21511
21484
  connector_id: this.connectorId,
21512
21485
  event_type: event.type,
@@ -21522,7 +21495,7 @@ class InPageConnector extends BaseAsyncConnector {
21522
21495
  document.addEventListener('resume', lifecycleLogger);
21523
21496
  }
21524
21497
  // Log initial state with detailed visibility info
21525
- logger$K.debug('inpage_initial_visibility', {
21498
+ logger$L.debug('inpage_initial_visibility', {
21526
21499
  channel: this.channelName,
21527
21500
  connector_id: this.connectorId,
21528
21501
  visibility: document.hidden ? 'hidden' : 'visible',
@@ -21540,7 +21513,7 @@ class InPageConnector extends BaseAsyncConnector {
21540
21513
  await super.start(inboundHandler);
21541
21514
  // After transitioning to STARTED, check if tab is already hidden
21542
21515
  if (typeof document !== 'undefined' && document.hidden) {
21543
- logger$K.debug('inpage_start_in_hidden_tab', {
21516
+ logger$L.debug('inpage_start_in_hidden_tab', {
21544
21517
  channel: this.channelName,
21545
21518
  connector_id: this.connectorId,
21546
21519
  document_hidden: document.hidden,
@@ -21550,7 +21523,7 @@ class InPageConnector extends BaseAsyncConnector {
21550
21523
  });
21551
21524
  // Immediately pause if tab is hidden at start time
21552
21525
  await this.pause().catch((err) => {
21553
- logger$K.warning('inpage_initial_pause_failed', {
21526
+ logger$L.warning('inpage_initial_pause_failed', {
21554
21527
  channel: this.channelName,
21555
21528
  connector_id: this.connectorId,
21556
21529
  error: err instanceof Error ? err.message : String(err),
@@ -21580,14 +21553,14 @@ class InPageConnector extends BaseAsyncConnector {
21580
21553
  }
21581
21554
  catch (error) {
21582
21555
  if (error instanceof QueueFullError) {
21583
- logger$K.warning('inpage_push_queue_full', {
21556
+ logger$L.warning('inpage_push_queue_full', {
21584
21557
  channel: this.channelName,
21585
21558
  inbox_capacity: this.inboxCapacity,
21586
21559
  inbox_remaining_capacity: this.inbox.remainingCapacity,
21587
21560
  });
21588
21561
  throw error;
21589
21562
  }
21590
- logger$K.error('inpage_push_failed', {
21563
+ logger$L.error('inpage_push_failed', {
21591
21564
  channel: this.channelName,
21592
21565
  error: error instanceof Error ? error.message : String(error),
21593
21566
  });
@@ -21597,7 +21570,7 @@ class InPageConnector extends BaseAsyncConnector {
21597
21570
  async _transportSendBytes(data) {
21598
21571
  ensureBrowserEnvironment$2();
21599
21572
  const targetNodeId = this.targetNodeId ?? '*';
21600
- logger$K.debug('inpage_message_sending', {
21573
+ logger$L.debug('inpage_message_sending', {
21601
21574
  channel: this.channelName,
21602
21575
  sender_id: this.connectorId,
21603
21576
  sender_node_id: this.localNodeId,
@@ -21621,7 +21594,7 @@ class InPageConnector extends BaseAsyncConnector {
21621
21594
  return item;
21622
21595
  }
21623
21596
  async _transportClose(code, reason) {
21624
- logger$K.debug('inpage_transport_closing', {
21597
+ logger$L.debug('inpage_transport_closing', {
21625
21598
  channel: this.channelName,
21626
21599
  connector_id: this.connectorId,
21627
21600
  code,
@@ -21630,14 +21603,14 @@ class InPageConnector extends BaseAsyncConnector {
21630
21603
  timestamp: new Date().toISOString(),
21631
21604
  });
21632
21605
  if (this.listenerRegistered) {
21633
- logger$K.debug('inpage_removing_listener', {
21606
+ logger$L.debug('inpage_removing_listener', {
21634
21607
  channel: this.channelName,
21635
21608
  connector_id: this.connectorId,
21636
21609
  timestamp: new Date().toISOString(),
21637
21610
  });
21638
21611
  getSharedBus$1().removeEventListener(this.channelName, this.onMsg);
21639
21612
  this.listenerRegistered = false;
21640
- logger$K.debug('inpage_listener_removed', {
21613
+ logger$L.debug('inpage_listener_removed', {
21641
21614
  channel: this.channelName,
21642
21615
  connector_id: this.connectorId,
21643
21616
  timestamp: new Date().toISOString(),
@@ -21669,7 +21642,7 @@ class InPageConnector extends BaseAsyncConnector {
21669
21642
  if (targetNodeId &&
21670
21643
  targetNodeId !== '*' &&
21671
21644
  targetNodeId !== this.localNodeId) {
21672
- logger$K.debug('inpage_message_rejected', {
21645
+ logger$L.debug('inpage_message_rejected', {
21673
21646
  channel: this.channelName,
21674
21647
  connector_id: this.connectorId,
21675
21648
  reason: 'wildcard_target_mismatch',
@@ -21685,7 +21658,7 @@ class InPageConnector extends BaseAsyncConnector {
21685
21658
  if (expectedSender &&
21686
21659
  expectedSender !== '*' &&
21687
21660
  senderNodeId !== expectedSender) {
21688
- logger$K.debug('inpage_message_rejected', {
21661
+ logger$L.debug('inpage_message_rejected', {
21689
21662
  channel: this.channelName,
21690
21663
  connector_id: this.connectorId,
21691
21664
  reason: 'unexpected_sender',
@@ -21698,7 +21671,7 @@ class InPageConnector extends BaseAsyncConnector {
21698
21671
  if (targetNodeId &&
21699
21672
  targetNodeId !== '*' &&
21700
21673
  targetNodeId !== this.localNodeId) {
21701
- logger$K.debug('inpage_message_rejected', {
21674
+ logger$L.debug('inpage_message_rejected', {
21702
21675
  channel: this.channelName,
21703
21676
  connector_id: this.connectorId,
21704
21677
  reason: 'unexpected_target',
@@ -21723,7 +21696,7 @@ class InPageConnector extends BaseAsyncConnector {
21723
21696
  return 'unknown';
21724
21697
  }
21725
21698
  logInboxSnapshot(event, extra = {}) {
21726
- logger$K.debug(event, {
21699
+ logger$L.debug(event, {
21727
21700
  channel: this.channelName,
21728
21701
  connector_id: this.connectorId,
21729
21702
  connector_state: this.state,
@@ -21742,7 +21715,7 @@ class InPageConnector extends BaseAsyncConnector {
21742
21715
  return;
21743
21716
  }
21744
21717
  this.targetNodeId = normalized;
21745
- logger$K.debug('inpage_target_updated', {
21718
+ logger$L.debug('inpage_target_updated', {
21746
21719
  channel: this.channelName,
21747
21720
  connector_id: this.connectorId,
21748
21721
  local_node_id: this.localNodeId,
@@ -21752,7 +21725,7 @@ class InPageConnector extends BaseAsyncConnector {
21752
21725
  }
21753
21726
  setWildcardTarget() {
21754
21727
  this.targetNodeId = '*';
21755
- logger$K.debug('inpage_target_updated', {
21728
+ logger$L.debug('inpage_target_updated', {
21756
21729
  channel: this.channelName,
21757
21730
  connector_id: this.connectorId,
21758
21731
  local_node_id: this.localNodeId,
@@ -21946,6 +21919,185 @@ class AuthorizerFactory extends AbstractResourceFactory {
21946
21919
  }
21947
21920
  }
21948
21921
 
21922
+ const logger$K = getLogger('naylence.fame.security.auth.authorization_profile_factory');
21923
+ const PROFILE_NAME_DEFAULT = 'jwt';
21924
+ const PROFILE_NAME_OAUTH2 = 'oauth2';
21925
+ const PROFILE_NAME_OAUTH2_GATED = 'oauth2-gated';
21926
+ const PROFILE_NAME_OAUTH2_CALLBACK = 'oauth2-callback';
21927
+ const PROFILE_NAME_NOOP$2 = 'noop';
21928
+ const ENV_VAR_JWT_TRUSTED_ISSUER$1 = 'FAME_JWT_TRUSTED_ISSUER';
21929
+ const ENV_VAR_JWT_ALGORITHM$1 = 'FAME_JWT_ALGORITHM';
21930
+ const ENV_VAR_JWT_AUDIENCE$2 = 'FAME_JWT_AUDIENCE';
21931
+ const ENV_VAR_JWKS_URL$1 = 'FAME_JWKS_URL';
21932
+ const ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY$1 = 'FAME_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY';
21933
+ const ENV_VAR_TRUSTED_CLIENT_SCOPE$1 = 'FAME_TRUSTED_CLIENT_SCOPE';
21934
+ const ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1 = 'FAME_JWT_REVERSE_AUTH_TRUSTED_ISSUER';
21935
+ const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
21936
+ const ENV_VAR_HMAC_SECRET$1 = 'FAME_HMAC_SECRET';
21937
+ const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
21938
+ const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
21939
+ const DEFAULT_PROFILE = {
21940
+ type: 'DefaultAuthorizer',
21941
+ verifier: {
21942
+ type: 'JWKSJWTTokenVerifier',
21943
+ jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
21944
+ issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
21945
+ },
21946
+ };
21947
+ const OAUTH2_PROFILE = {
21948
+ type: 'OAuth2Authorizer',
21949
+ issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
21950
+ required_scopes: ['node.connect'],
21951
+ require_scope: true,
21952
+ default_ttl_sec: 3600,
21953
+ max_ttl_sec: 86400,
21954
+ algorithm: Expressions.env(ENV_VAR_JWT_ALGORITHM$1, 'RS256'),
21955
+ audience: Expressions.env(ENV_VAR_JWT_AUDIENCE$2),
21956
+ };
21957
+ const OAUTH2_GATED_PROFILE = {
21958
+ ...OAUTH2_PROFILE,
21959
+ enforce_token_subject_node_identity: Expressions.env(ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY$1, 'false'),
21960
+ trusted_client_scope: Expressions.env(ENV_VAR_TRUSTED_CLIENT_SCOPE$1, 'node.trusted'),
21961
+ };
21962
+ const OAUTH2_CALLBACK_PROFILE = {
21963
+ type: 'OAuth2Authorizer',
21964
+ issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1, DEFAULT_REVERSE_AUTH_ISSUER),
21965
+ audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1),
21966
+ require_scope: true,
21967
+ default_ttl_sec: 3600,
21968
+ max_ttl_sec: 86400,
21969
+ reverse_auth_ttl_sec: 86400,
21970
+ token_verifier_config: {
21971
+ type: 'JWTTokenVerifier',
21972
+ algorithm: 'HS256',
21973
+ hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET$1),
21974
+ issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1, DEFAULT_REVERSE_AUTH_ISSUER),
21975
+ ttl_sec: 86400,
21976
+ },
21977
+ token_issuer_config: {
21978
+ type: 'JWTTokenIssuer',
21979
+ algorithm: 'HS256',
21980
+ hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET$1),
21981
+ kid: 'hmac-reverse-auth-key',
21982
+ issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1, DEFAULT_REVERSE_AUTH_ISSUER),
21983
+ ttl_sec: 86400,
21984
+ audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1, DEFAULT_REVERSE_AUTH_AUDIENCE),
21985
+ },
21986
+ };
21987
+ const NOOP_PROFILE$2 = {
21988
+ type: 'NoopAuthorizer',
21989
+ };
21990
+ const PROFILE_MAP$5 = {
21991
+ [PROFILE_NAME_DEFAULT]: DEFAULT_PROFILE,
21992
+ [PROFILE_NAME_OAUTH2]: OAUTH2_PROFILE,
21993
+ [PROFILE_NAME_OAUTH2_GATED]: OAUTH2_GATED_PROFILE,
21994
+ [PROFILE_NAME_OAUTH2_CALLBACK]: OAUTH2_CALLBACK_PROFILE,
21995
+ [PROFILE_NAME_NOOP$2]: NOOP_PROFILE$2,
21996
+ };
21997
+ const PROFILE_ALIASES$1 = {
21998
+ jwt: PROFILE_NAME_DEFAULT,
21999
+ jwks: PROFILE_NAME_DEFAULT,
22000
+ default: PROFILE_NAME_DEFAULT,
22001
+ oauth2: PROFILE_NAME_OAUTH2,
22002
+ oidc: PROFILE_NAME_OAUTH2,
22003
+ 'oauth2-gated': PROFILE_NAME_OAUTH2_GATED,
22004
+ oauth2_gated: PROFILE_NAME_OAUTH2_GATED,
22005
+ 'oauth2-callback': PROFILE_NAME_OAUTH2_CALLBACK,
22006
+ oauth2_callback: PROFILE_NAME_OAUTH2_CALLBACK,
22007
+ 'reverse-auth': PROFILE_NAME_OAUTH2_CALLBACK,
22008
+ noop: PROFILE_NAME_NOOP$2,
22009
+ 'no-op': PROFILE_NAME_NOOP$2,
22010
+ no_op: PROFILE_NAME_NOOP$2,
22011
+ };
22012
+ const FACTORY_META$15 = {
22013
+ base: AUTHORIZER_FACTORY_BASE_TYPE,
22014
+ key: 'AuthorizationProfile',
22015
+ };
22016
+ class AuthorizationProfileFactory extends AuthorizerFactory {
22017
+ constructor() {
22018
+ super(...arguments);
22019
+ this.type = 'AuthorizationProfile';
22020
+ }
22021
+ async create(config, ...factoryArgs) {
22022
+ const normalized = normalizeConfig$w(config);
22023
+ const profileConfig = resolveProfileConfig$4(normalized.profile);
22024
+ logger$K.debug('enabling_authorization_profile', {
22025
+ profile: normalized.profile,
22026
+ });
22027
+ const authorizer = await AuthorizerFactory.createAuthorizer(profileConfig, { factoryArgs });
22028
+ if (!authorizer) {
22029
+ throw new Error(`Failed to create authorizer for profile: ${normalized.profile}`);
22030
+ }
22031
+ return authorizer;
22032
+ }
22033
+ }
22034
+ function normalizeConfig$w(config) {
22035
+ if (!config) {
22036
+ return { profile: PROFILE_NAME_OAUTH2 };
22037
+ }
22038
+ const candidate = config;
22039
+ const profileValue = resolveProfileName$2(candidate);
22040
+ const canonicalProfile = canonicalizeProfileName$1(profileValue);
22041
+ candidate.profile = canonicalProfile;
22042
+ return { profile: canonicalProfile };
22043
+ }
22044
+ function resolveProfileName$2(candidate) {
22045
+ const direct = coerceProfileString$2(candidate.profile);
22046
+ if (direct) {
22047
+ return direct;
22048
+ }
22049
+ const legacyKeys = ['profile_name', 'profileName'];
22050
+ for (const legacyKey of legacyKeys) {
22051
+ const legacyValue = coerceProfileString$2(candidate[legacyKey]);
22052
+ if (legacyValue) {
22053
+ return legacyValue;
22054
+ }
22055
+ }
22056
+ return PROFILE_NAME_OAUTH2;
22057
+ }
22058
+ function coerceProfileString$2(value) {
22059
+ if (typeof value !== 'string') {
22060
+ return null;
22061
+ }
22062
+ const trimmed = value.trim();
22063
+ return trimmed.length > 0 ? trimmed : null;
22064
+ }
22065
+ function canonicalizeProfileName$1(value) {
22066
+ const normalized = value.replace(/[\s_]+/g, '-').toLowerCase();
22067
+ return PROFILE_ALIASES$1[normalized] ?? normalized;
22068
+ }
22069
+ function resolveProfileConfig$4(profileName) {
22070
+ const profile = PROFILE_MAP$5[profileName];
22071
+ if (!profile) {
22072
+ throw new Error(`Unknown authorization profile: ${profileName}`);
22073
+ }
22074
+ return deepClone$4(profile);
22075
+ }
22076
+ function deepClone$4(value) {
22077
+ return JSON.parse(JSON.stringify(value));
22078
+ }
22079
+
22080
+ var authorizationProfileFactory = /*#__PURE__*/Object.freeze({
22081
+ __proto__: null,
22082
+ AuthorizationProfileFactory: AuthorizationProfileFactory,
22083
+ ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY: ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY$1,
22084
+ ENV_VAR_HMAC_SECRET: ENV_VAR_HMAC_SECRET$1,
22085
+ ENV_VAR_JWKS_URL: ENV_VAR_JWKS_URL$1,
22086
+ ENV_VAR_JWT_ALGORITHM: ENV_VAR_JWT_ALGORITHM$1,
22087
+ ENV_VAR_JWT_AUDIENCE: ENV_VAR_JWT_AUDIENCE$2,
22088
+ ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE: ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1,
22089
+ ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER: ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1,
22090
+ ENV_VAR_JWT_TRUSTED_ISSUER: ENV_VAR_JWT_TRUSTED_ISSUER$1,
22091
+ ENV_VAR_TRUSTED_CLIENT_SCOPE: ENV_VAR_TRUSTED_CLIENT_SCOPE$1,
22092
+ FACTORY_META: FACTORY_META$15,
22093
+ PROFILE_NAME_DEFAULT: PROFILE_NAME_DEFAULT,
22094
+ PROFILE_NAME_NOOP: PROFILE_NAME_NOOP$2,
22095
+ PROFILE_NAME_OAUTH2: PROFILE_NAME_OAUTH2,
22096
+ PROFILE_NAME_OAUTH2_CALLBACK: PROFILE_NAME_OAUTH2_CALLBACK,
22097
+ PROFILE_NAME_OAUTH2_GATED: PROFILE_NAME_OAUTH2_GATED,
22098
+ default: AuthorizationProfileFactory
22099
+ });
22100
+
21949
22101
  function isAuthInjectionStrategy(candidate) {
21950
22102
  return (typeof candidate === 'object' &&
21951
22103
  candidate !== null &&
@@ -29427,14 +29579,13 @@ const ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER = 'FAME_JWT_REVERSE_AUTH_TRUSTED_I
29427
29579
  const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
29428
29580
  const ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY = 'FAME_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY';
29429
29581
  const ENV_VAR_TRUSTED_CLIENT_SCOPE = 'FAME_TRUSTED_CLIENT_SCOPE';
29582
+ const ENV_VAR_AUTHORIZATION_PROFILE = 'FAME_AUTHORIZATION_PROFILE';
29430
29583
  const PROFILE_NAME_STRICT_OVERLAY = 'strict-overlay';
29431
29584
  const PROFILE_NAME_OVERLAY = 'overlay';
29432
29585
  const PROFILE_NAME_OVERLAY_CALLBACK = 'overlay-callback';
29433
29586
  const PROFILE_NAME_GATED = 'gated';
29434
29587
  const PROFILE_NAME_GATED_CALLBACK = 'gated-callback';
29435
29588
  const PROFILE_NAME_OPEN$1 = 'open';
29436
- const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
29437
- const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
29438
29589
  const STRICT_OVERLAY_PROFILE = {
29439
29590
  type: 'DefaultSecurityManager',
29440
29591
  security_policy: {
@@ -29480,12 +29631,8 @@ const STRICT_OVERLAY_PROFILE = {
29480
29631
  },
29481
29632
  },
29482
29633
  authorizer: {
29483
- type: 'DefaultAuthorizer',
29484
- verifier: {
29485
- type: 'JWKSJWTTokenVerifier',
29486
- jwks_url: Expressions.env(ENV_VAR_JWKS_URL),
29487
- issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER),
29488
- },
29634
+ type: 'AuthorizationProfile',
29635
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'jwt'),
29489
29636
  },
29490
29637
  };
29491
29638
  const OVERLAY_PROFILE = {
@@ -29532,14 +29679,8 @@ const OVERLAY_PROFILE = {
29532
29679
  },
29533
29680
  },
29534
29681
  authorizer: {
29535
- type: 'OAuth2Authorizer',
29536
- issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER),
29537
- required_scopes: ['node.connect'],
29538
- require_scope: true,
29539
- default_ttl_sec: 3600,
29540
- max_ttl_sec: 86400,
29541
- algorithm: Expressions.env(ENV_VAR_JWT_ALGORITHM, 'RS256'),
29542
- audience: Expressions.env(ENV_VAR_JWT_AUDIENCE$1),
29682
+ type: 'AuthorizationProfile',
29683
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'oauth2'),
29543
29684
  },
29544
29685
  };
29545
29686
  const OVERLAY_CALLBACK_PROFILE = {
@@ -29586,29 +29727,8 @@ const OVERLAY_CALLBACK_PROFILE = {
29586
29727
  },
29587
29728
  },
29588
29729
  authorizer: {
29589
- type: 'OAuth2Authorizer',
29590
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29591
- audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE),
29592
- require_scope: true,
29593
- default_ttl_sec: 3600,
29594
- max_ttl_sec: 86400,
29595
- reverse_auth_ttl_sec: 86400,
29596
- token_verifier_config: {
29597
- type: 'JWTTokenVerifier',
29598
- algorithm: 'HS256',
29599
- hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET),
29600
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29601
- ttl_sec: 86400,
29602
- },
29603
- token_issuer_config: {
29604
- type: 'JWTTokenIssuer',
29605
- algorithm: 'HS256',
29606
- hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET),
29607
- kid: 'hmac-reverse-auth-key',
29608
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29609
- ttl_sec: 86400,
29610
- audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, DEFAULT_REVERSE_AUTH_AUDIENCE),
29611
- },
29730
+ type: 'AuthorizationProfile',
29731
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'oauth2-callback'),
29612
29732
  },
29613
29733
  };
29614
29734
  const GATED_PROFILE = {
@@ -29654,16 +29774,8 @@ const GATED_PROFILE = {
29654
29774
  },
29655
29775
  },
29656
29776
  authorizer: {
29657
- type: 'OAuth2Authorizer',
29658
- issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER),
29659
- required_scopes: ['node.connect'],
29660
- require_scope: true,
29661
- default_ttl_sec: 3600,
29662
- max_ttl_sec: 86400,
29663
- algorithm: Expressions.env(ENV_VAR_JWT_ALGORITHM, 'RS256'),
29664
- audience: Expressions.env(ENV_VAR_JWT_AUDIENCE$1),
29665
- enforce_token_subject_node_identity: Expressions.env(ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY, 'false'),
29666
- trusted_client_scope: Expressions.env(ENV_VAR_TRUSTED_CLIENT_SCOPE, 'node.trusted'),
29777
+ type: 'AuthorizationProfile',
29778
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'oauth2-gated'),
29667
29779
  },
29668
29780
  };
29669
29781
  const GATED_CALLBACK_PROFILE = {
@@ -29709,29 +29821,8 @@ const GATED_CALLBACK_PROFILE = {
29709
29821
  },
29710
29822
  },
29711
29823
  authorizer: {
29712
- type: 'OAuth2Authorizer',
29713
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29714
- audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE),
29715
- require_scope: true,
29716
- default_ttl_sec: 3600,
29717
- max_ttl_sec: 86400,
29718
- reverse_auth_ttl_sec: 86400,
29719
- token_verifier_config: {
29720
- type: 'JWTTokenVerifier',
29721
- algorithm: 'HS256',
29722
- hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET),
29723
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29724
- ttl_sec: 86400,
29725
- },
29726
- token_issuer_config: {
29727
- type: 'JWTTokenIssuer',
29728
- algorithm: 'HS256',
29729
- hmac_secret: Expressions.env(ENV_VAR_HMAC_SECRET),
29730
- kid: 'hmac-reverse-auth-key',
29731
- issuer: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, DEFAULT_REVERSE_AUTH_ISSUER),
29732
- ttl_sec: 86400,
29733
- audience: Expressions.env(ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, DEFAULT_REVERSE_AUTH_AUDIENCE),
29734
- },
29824
+ type: 'AuthorizationProfile',
29825
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'oauth2-callback'),
29735
29826
  },
29736
29827
  };
29737
29828
  const OPEN_PROFILE$1 = {
@@ -29740,7 +29831,8 @@ const OPEN_PROFILE$1 = {
29740
29831
  type: 'NoSecurityPolicy',
29741
29832
  },
29742
29833
  authorizer: {
29743
- type: 'NoopAuthorizer',
29834
+ type: 'AuthorizationProfile',
29835
+ profile: Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'noop'),
29744
29836
  },
29745
29837
  };
29746
29838
  const PROFILE_MAP$4 = {
@@ -29869,6 +29961,7 @@ function deepClone$3(value) {
29869
29961
 
29870
29962
  var nodeSecurityProfileFactory = /*#__PURE__*/Object.freeze({
29871
29963
  __proto__: null,
29964
+ ENV_VAR_AUTHORIZATION_PROFILE: ENV_VAR_AUTHORIZATION_PROFILE,
29872
29965
  ENV_VAR_DEFAULT_ENCRYPTION_LEVEL: ENV_VAR_DEFAULT_ENCRYPTION_LEVEL,
29873
29966
  ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY: ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY,
29874
29967
  ENV_VAR_HMAC_SECRET: ENV_VAR_HMAC_SECRET,
@@ -43620,4 +43713,4 @@ var otelSetup = /*#__PURE__*/Object.freeze({
43620
43713
  setupOtel: setupOtel
43621
43714
  });
43622
43715
 
43623
- export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZATION_POLICY_FACTORY_BASE_TYPE, AUTHORIZATION_POLICY_SOURCE_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizationPolicyFactory, AuthorizationPolicySourceFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$$ as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BasicAuthorizationPolicy, BasicAuthorizationPolicyFactory, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CONNECTION_RETRY_POLICY_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectionRetryPolicyFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$11 as DEFAULT_WELCOME_FACTORY_META, DefaultConnectionRetryPolicy, DefaultConnectionRetryPolicyFactory, DefaultCryptoProvider, DefaultKeyManager, DefaultNodeIdentityPolicy, DefaultNodeIdentityPolicyFactory, 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_SESSION_MAX_INITIAL_ATTEMPTS, 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$12 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$10 as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$_ 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, KNOWN_POLICY_FIELDS, KNOWN_RULE_FIELDS, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MAX_SCOPE_NESTING_DEPTH, MemoryMetricsEmitter, NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodeIdentityPolicyFactory, NodeIdentityPolicyProfileFactory, 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, TokenSubjectNodeIdentityPolicy, TokenSubjectNodeIdentityPolicyFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_ACTIONS, VALID_CURVES_BY_KTY, VALID_EFFECTS, VALID_KEY_USES, VALID_ORIGIN_TYPES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, assertNotRegexPattern, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compileGlobOnlyScopeRequirement, compileGlobPattern, compilePattern, compileScopeRequirement, 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, evaluateScopeRequirement, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCompiledGlobPattern, getCurrentEnvelope, getFabricForNode, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isIdentityExposingTokenProvider, isInPageConnectionGrant, isNodeLike, isPlainObject$4 as isPlainObject, isPoolAddress, isPoolLogical, isRegexPattern, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchPattern, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeScopeRequirement, 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 };
43716
+ export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZATION_POLICY_FACTORY_BASE_TYPE, AUTHORIZATION_POLICY_SOURCE_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY$1 as AUTH_PROFILE_ENV_VAR_ENFORCE_TOKEN_SUBJECT_NODE_IDENTITY, ENV_VAR_HMAC_SECRET$1 as AUTH_PROFILE_ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL$1 as AUTH_PROFILE_ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM$1 as AUTH_PROFILE_ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$2 as AUTH_PROFILE_ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 as AUTH_PROFILE_ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER$1 as AUTH_PROFILE_ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER$1 as AUTH_PROFILE_ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_TRUSTED_CLIENT_SCOPE$1 as AUTH_PROFILE_ENV_VAR_TRUSTED_CLIENT_SCOPE, PROFILE_NAME_DEFAULT as AUTH_PROFILE_NAME_DEFAULT, PROFILE_NAME_NOOP$2 as AUTH_PROFILE_NAME_NOOP, PROFILE_NAME_OAUTH2 as AUTH_PROFILE_NAME_OAUTH2, PROFILE_NAME_OAUTH2_CALLBACK as AUTH_PROFILE_NAME_OAUTH2_CALLBACK, PROFILE_NAME_OAUTH2_GATED as AUTH_PROFILE_NAME_OAUTH2_GATED, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizationPolicyFactory, AuthorizationPolicySourceFactory, AuthorizationProfileFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$$ as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BasicAuthorizationPolicy, BasicAuthorizationPolicyFactory, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CONNECTION_RETRY_POLICY_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectionRetryPolicyFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$11 as DEFAULT_WELCOME_FACTORY_META, DefaultConnectionRetryPolicy, DefaultConnectionRetryPolicyFactory, DefaultCryptoProvider, DefaultKeyManager, DefaultNodeIdentityPolicy, DefaultNodeIdentityPolicyFactory, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_AUTHORIZATION_PROFILE, 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_SESSION_MAX_INITIAL_ATTEMPTS, 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$12 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$10 as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$_ 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, KNOWN_POLICY_FIELDS, KNOWN_RULE_FIELDS, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MAX_SCOPE_NESTING_DEPTH, MemoryMetricsEmitter, NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodeIdentityPolicyFactory, NodeIdentityPolicyProfileFactory, 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, TokenSubjectNodeIdentityPolicy, TokenSubjectNodeIdentityPolicyFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_ACTIONS, VALID_CURVES_BY_KTY, VALID_EFFECTS, VALID_KEY_USES, VALID_ORIGIN_TYPES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, assertNotRegexPattern, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compileGlobOnlyScopeRequirement, compileGlobPattern, compilePattern, compileScopeRequirement, 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, evaluateScopeRequirement, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCompiledGlobPattern, getCurrentEnvelope, getFabricForNode, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isIdentityExposingTokenProvider, isInPageConnectionGrant, isNodeLike, isPlainObject$4 as isPlainObject, isPoolAddress, isPoolLogical, isRegexPattern, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchPattern, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeScopeRequirement, 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 };