@naylence/runtime 0.3.5-test.921 → 0.3.5-test.923

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.
@@ -2,23 +2,23 @@ import { parseAddressComponents, FlowFlags, FameAddress, DEFAULT_POLLING_TIMEOUT
2
2
  export * from '@naylence/core';
3
3
  import { z, ZodError } from 'zod';
4
4
  import { AbstractResourceFactory, createResource as createResource$1, createDefaultResource, registerFactory, Expressions, ExtensionManager, ExpressionEvaluationPolicy, Registry, configValidator } from '@naylence/factory';
5
+ import { sign, hashes, verify } from '@noble/ed25519';
6
+ import { sha256, sha512 } from '@noble/hashes/sha2.js';
5
7
  import { chacha20poly1305 } from '@noble/ciphers/chacha.js';
6
8
  import { x25519 } from '@noble/curves/ed25519.js';
7
9
  import { hkdf } from '@noble/hashes/hkdf.js';
8
- import { sha256, sha512 } from '@noble/hashes/sha2.js';
9
10
  import { utf8ToBytes, bytesToHex, randomBytes, concatBytes } from '@noble/hashes/utils.js';
10
11
  import { parse } from 'yaml';
11
12
  import fastify from 'fastify';
12
13
  import websocketPlugin from '@fastify/websocket';
13
- import { sign, hashes, verify } from '@noble/ed25519';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.5-test.921
16
+ // Generated from package.json version: 0.3.5-test.923
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.921';
21
+ const VERSION = '0.3.5-test.923';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -25160,6 +25160,251 @@ class SigningConfig {
25160
25160
  }
25161
25161
  }
25162
25162
 
25163
+ function hasBuffer() {
25164
+ return typeof Buffer !== 'undefined';
25165
+ }
25166
+ function readStringProperty(source, ...names) {
25167
+ if (!source || typeof source !== 'object') {
25168
+ return undefined;
25169
+ }
25170
+ for (const name of names) {
25171
+ const value = source[name];
25172
+ if (typeof value === 'string' && value.length > 0) {
25173
+ return value;
25174
+ }
25175
+ }
25176
+ return undefined;
25177
+ }
25178
+ function decodePem(pem) {
25179
+ const base64 = pem
25180
+ .replace(/-----BEGIN[^-]+-----/g, '')
25181
+ .replace(/-----END[^-]+-----/g, '')
25182
+ .replace(/\s+/g, '');
25183
+ if (typeof atob === 'function') {
25184
+ const binary = atob(base64);
25185
+ const bytes = new Uint8Array(binary.length);
25186
+ for (let i = 0; i < binary.length; i += 1) {
25187
+ bytes[i] = binary.charCodeAt(i);
25188
+ }
25189
+ return bytes;
25190
+ }
25191
+ if (hasBuffer()) {
25192
+ return Uint8Array.from(Buffer.from(base64, 'base64'));
25193
+ }
25194
+ throw new Error('Base64 decoding is not available in this environment');
25195
+ }
25196
+ function readLength(data, offset) {
25197
+ const initial = data[offset];
25198
+ if (initial === undefined) {
25199
+ throw new Error('Unexpected end of ASN.1 data');
25200
+ }
25201
+ if ((initial & 0x80) === 0) {
25202
+ return { length: initial, nextOffset: offset + 1 };
25203
+ }
25204
+ const lengthOfLength = initial & 0x7f;
25205
+ if (lengthOfLength === 0 || lengthOfLength > 4) {
25206
+ throw new Error('Unsupported ASN.1 length encoding');
25207
+ }
25208
+ let length = 0;
25209
+ let position = offset + 1;
25210
+ for (let i = 0; i < lengthOfLength; i += 1) {
25211
+ const byte = data[position];
25212
+ if (byte === undefined) {
25213
+ throw new Error('Unexpected end of ASN.1 data');
25214
+ }
25215
+ length = (length << 8) | byte;
25216
+ position += 1;
25217
+ }
25218
+ return { length, nextOffset: position };
25219
+ }
25220
+ function readElement(data, offset, tag) {
25221
+ if (data[offset] !== tag) {
25222
+ throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
25223
+ }
25224
+ const { length, nextOffset } = readLength(data, offset + 1);
25225
+ const contentOffset = nextOffset;
25226
+ return {
25227
+ length,
25228
+ contentOffset,
25229
+ nextOffset: contentOffset + length,
25230
+ };
25231
+ }
25232
+ function parseEd25519PrivateKey(pem) {
25233
+ const raw = decodePem(pem);
25234
+ if (raw.length === 32) {
25235
+ return raw.slice();
25236
+ }
25237
+ // Handle PKCS#8 structure defined in RFC 8410
25238
+ const sequence = readElement(raw, 0, 0x30);
25239
+ const version = readElement(raw, sequence.contentOffset, 0x02);
25240
+ let offset = version.nextOffset;
25241
+ const algorithm = readElement(raw, offset, 0x30);
25242
+ offset = algorithm.nextOffset;
25243
+ const privateKey = readElement(raw, offset, 0x04);
25244
+ const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
25245
+ if (privateContent.length === 32) {
25246
+ return privateContent.slice();
25247
+ }
25248
+ if (privateContent.length >= 34 && privateContent[0] === 0x04) {
25249
+ const innerLength = privateContent[1];
25250
+ if (innerLength !== 32 || privateContent.length < innerLength + 2) {
25251
+ throw new Error('Unexpected Ed25519 private key length');
25252
+ }
25253
+ return privateContent.subarray(2, 34);
25254
+ }
25255
+ throw new Error('Unsupported Ed25519 private key structure');
25256
+ }
25257
+ const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
25258
+ function encodeUtf8(value) {
25259
+ if (textEncoder) {
25260
+ return textEncoder.encode(value);
25261
+ }
25262
+ if (hasBuffer()) {
25263
+ return Uint8Array.from(Buffer.from(value, 'utf8'));
25264
+ }
25265
+ throw new Error('No UTF-8 encoder available in this environment');
25266
+ }
25267
+
25268
+ if (!hashes.sha512) {
25269
+ hashes.sha512 = (message) => sha512(message);
25270
+ }
25271
+ function normalizeSignerOptions(options) {
25272
+ if (!options || typeof options !== 'object') {
25273
+ return {};
25274
+ }
25275
+ const candidate = options;
25276
+ const result = {
25277
+ ...options,
25278
+ };
25279
+ const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
25280
+ if (cryptoProvider !== undefined) {
25281
+ result.cryptoProvider = cryptoProvider ?? null;
25282
+ }
25283
+ const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
25284
+ if (signingConfig !== undefined) {
25285
+ result.signingConfig = signingConfig;
25286
+ }
25287
+ const privateKeyPem = resolveAlias(candidate, [
25288
+ 'privateKeyPem',
25289
+ 'private_key_pem',
25290
+ ]);
25291
+ if (privateKeyPem !== undefined) {
25292
+ result.privateKeyPem = privateKeyPem;
25293
+ }
25294
+ const keyId = resolveAlias(candidate, [
25295
+ 'keyId',
25296
+ 'key_id',
25297
+ ]);
25298
+ if (keyId !== undefined) {
25299
+ result.keyId = keyId;
25300
+ }
25301
+ return result;
25302
+ }
25303
+ class EdDSAEnvelopeSigner {
25304
+ constructor(options = {}) {
25305
+ const normalized = normalizeSignerOptions(options);
25306
+ const provider = normalized.cryptoProvider ?? null;
25307
+ if (!provider) {
25308
+ throw new Error('No crypto provider is configured for signing');
25309
+ }
25310
+ this.crypto = provider;
25311
+ const signingConfigOption = normalized.signingConfig;
25312
+ if (signingConfigOption instanceof SigningConfig) {
25313
+ this.signingConfig = signingConfigOption;
25314
+ }
25315
+ else if (signingConfigOption) {
25316
+ this.signingConfig = new SigningConfig(signingConfigOption);
25317
+ }
25318
+ else {
25319
+ this.signingConfig = new SigningConfig();
25320
+ }
25321
+ this.explicitPrivateKey = normalized.privateKeyPem;
25322
+ this.explicitKeyId = normalized.keyId;
25323
+ }
25324
+ signEnvelope(envelope, { physicalPath }) {
25325
+ if (!envelope.sid) {
25326
+ throw new Error('Envelope missing sid');
25327
+ }
25328
+ const frame = envelope.frame;
25329
+ if (frame.type === 'Data') {
25330
+ const dataFrame = frame;
25331
+ if (!dataFrame.pd) {
25332
+ const payload = dataFrame.payload ?? '';
25333
+ const payloadString = payload === '' ? '' : canonicalJson(payload);
25334
+ dataFrame.pd = secureDigest(payloadString);
25335
+ }
25336
+ }
25337
+ const digest = frameDigest(frame);
25338
+ const immutable = canonicalJson(immutableHeaders(envelope));
25339
+ const sidDigest = secureDigest(physicalPath);
25340
+ const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
25341
+ 1 +
25342
+ encodeUtf8(immutable).length +
25343
+ 1 +
25344
+ encodeUtf8(digest).length);
25345
+ const sidBytes = encodeUtf8(sidDigest);
25346
+ const immBytes = encodeUtf8(immutable);
25347
+ const digBytes = encodeUtf8(digest);
25348
+ let offset = 0;
25349
+ tbs.set(sidBytes, offset);
25350
+ offset += sidBytes.length;
25351
+ tbs[offset] = 0x1f;
25352
+ offset += 1;
25353
+ tbs.set(immBytes, offset);
25354
+ offset += immBytes.length;
25355
+ tbs[offset] = 0x1f;
25356
+ offset += 1;
25357
+ tbs.set(digBytes, offset);
25358
+ const privateKey = this.loadPrivateKey();
25359
+ const signatureBytes = sign(tbs, privateKey);
25360
+ const signature = urlsafeBase64Encode(signatureBytes);
25361
+ const kid = this.determineKeyId();
25362
+ const signatureHeader = {
25363
+ kid,
25364
+ val: signature,
25365
+ alg: 'EdDSA',
25366
+ };
25367
+ const secHeader = envelope.sec ?? {};
25368
+ secHeader.sig = signatureHeader;
25369
+ envelope.sec = secHeader;
25370
+ return envelope;
25371
+ }
25372
+ loadPrivateKey() {
25373
+ const pem = this.explicitPrivateKey ??
25374
+ readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
25375
+ if (!pem) {
25376
+ throw new Error('Crypto provider does not expose a signing private key');
25377
+ }
25378
+ return parseEd25519PrivateKey(pem);
25379
+ }
25380
+ determineKeyId() {
25381
+ if (this.explicitKeyId) {
25382
+ return this.explicitKeyId;
25383
+ }
25384
+ if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
25385
+ const certificateProvider = this
25386
+ .crypto;
25387
+ const jwk = certificateProvider.nodeJwk?.();
25388
+ if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
25389
+ const kid = jwk.kid;
25390
+ if (typeof kid === 'string' && kid.length > 0) {
25391
+ return kid;
25392
+ }
25393
+ }
25394
+ }
25395
+ const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
25396
+ if (!fallback) {
25397
+ throw new Error('Crypto provider does not expose a signature key id');
25398
+ }
25399
+ return fallback;
25400
+ }
25401
+ }
25402
+
25403
+ var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
25404
+ __proto__: null,
25405
+ EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
25406
+ });
25407
+
25163
25408
  const logger$x = getLogger('naylence.fame.security.auth.jwt_token_issuer');
25164
25409
  let joseModulePromise = null;
25165
25410
  async function requireJose() {
@@ -39265,251 +39510,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
39265
39510
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
39266
39511
  });
39267
39512
 
39268
- function hasBuffer() {
39269
- return typeof Buffer !== 'undefined';
39270
- }
39271
- function readStringProperty(source, ...names) {
39272
- if (!source || typeof source !== 'object') {
39273
- return undefined;
39274
- }
39275
- for (const name of names) {
39276
- const value = source[name];
39277
- if (typeof value === 'string' && value.length > 0) {
39278
- return value;
39279
- }
39280
- }
39281
- return undefined;
39282
- }
39283
- function decodePem(pem) {
39284
- const base64 = pem
39285
- .replace(/-----BEGIN[^-]+-----/g, '')
39286
- .replace(/-----END[^-]+-----/g, '')
39287
- .replace(/\s+/g, '');
39288
- if (typeof atob === 'function') {
39289
- const binary = atob(base64);
39290
- const bytes = new Uint8Array(binary.length);
39291
- for (let i = 0; i < binary.length; i += 1) {
39292
- bytes[i] = binary.charCodeAt(i);
39293
- }
39294
- return bytes;
39295
- }
39296
- if (hasBuffer()) {
39297
- return Uint8Array.from(Buffer.from(base64, 'base64'));
39298
- }
39299
- throw new Error('Base64 decoding is not available in this environment');
39300
- }
39301
- function readLength(data, offset) {
39302
- const initial = data[offset];
39303
- if (initial === undefined) {
39304
- throw new Error('Unexpected end of ASN.1 data');
39305
- }
39306
- if ((initial & 0x80) === 0) {
39307
- return { length: initial, nextOffset: offset + 1 };
39308
- }
39309
- const lengthOfLength = initial & 0x7f;
39310
- if (lengthOfLength === 0 || lengthOfLength > 4) {
39311
- throw new Error('Unsupported ASN.1 length encoding');
39312
- }
39313
- let length = 0;
39314
- let position = offset + 1;
39315
- for (let i = 0; i < lengthOfLength; i += 1) {
39316
- const byte = data[position];
39317
- if (byte === undefined) {
39318
- throw new Error('Unexpected end of ASN.1 data');
39319
- }
39320
- length = (length << 8) | byte;
39321
- position += 1;
39322
- }
39323
- return { length, nextOffset: position };
39324
- }
39325
- function readElement(data, offset, tag) {
39326
- if (data[offset] !== tag) {
39327
- throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
39328
- }
39329
- const { length, nextOffset } = readLength(data, offset + 1);
39330
- const contentOffset = nextOffset;
39331
- return {
39332
- length,
39333
- contentOffset,
39334
- nextOffset: contentOffset + length,
39335
- };
39336
- }
39337
- function parseEd25519PrivateKey(pem) {
39338
- const raw = decodePem(pem);
39339
- if (raw.length === 32) {
39340
- return raw.slice();
39341
- }
39342
- // Handle PKCS#8 structure defined in RFC 8410
39343
- const sequence = readElement(raw, 0, 0x30);
39344
- const version = readElement(raw, sequence.contentOffset, 0x02);
39345
- let offset = version.nextOffset;
39346
- const algorithm = readElement(raw, offset, 0x30);
39347
- offset = algorithm.nextOffset;
39348
- const privateKey = readElement(raw, offset, 0x04);
39349
- const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
39350
- if (privateContent.length === 32) {
39351
- return privateContent.slice();
39352
- }
39353
- if (privateContent.length >= 34 && privateContent[0] === 0x04) {
39354
- const innerLength = privateContent[1];
39355
- if (innerLength !== 32 || privateContent.length < innerLength + 2) {
39356
- throw new Error('Unexpected Ed25519 private key length');
39357
- }
39358
- return privateContent.subarray(2, 34);
39359
- }
39360
- throw new Error('Unsupported Ed25519 private key structure');
39361
- }
39362
- const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
39363
- function encodeUtf8(value) {
39364
- if (textEncoder) {
39365
- return textEncoder.encode(value);
39366
- }
39367
- if (hasBuffer()) {
39368
- return Uint8Array.from(Buffer.from(value, 'utf8'));
39369
- }
39370
- throw new Error('No UTF-8 encoder available in this environment');
39371
- }
39372
-
39373
- if (!hashes.sha512) {
39374
- hashes.sha512 = (message) => sha512(message);
39375
- }
39376
- function normalizeSignerOptions(options) {
39377
- if (!options || typeof options !== 'object') {
39378
- return {};
39379
- }
39380
- const candidate = options;
39381
- const result = {
39382
- ...options,
39383
- };
39384
- const cryptoProvider = resolveAlias(candidate, ['cryptoProvider', 'crypto_provider']);
39385
- if (cryptoProvider !== undefined) {
39386
- result.cryptoProvider = cryptoProvider ?? null;
39387
- }
39388
- const signingConfig = resolveAlias(candidate, ['signingConfig', 'signing_config']);
39389
- if (signingConfig !== undefined) {
39390
- result.signingConfig = signingConfig;
39391
- }
39392
- const privateKeyPem = resolveAlias(candidate, [
39393
- 'privateKeyPem',
39394
- 'private_key_pem',
39395
- ]);
39396
- if (privateKeyPem !== undefined) {
39397
- result.privateKeyPem = privateKeyPem;
39398
- }
39399
- const keyId = resolveAlias(candidate, [
39400
- 'keyId',
39401
- 'key_id',
39402
- ]);
39403
- if (keyId !== undefined) {
39404
- result.keyId = keyId;
39405
- }
39406
- return result;
39407
- }
39408
- class EdDSAEnvelopeSigner {
39409
- constructor(options = {}) {
39410
- const normalized = normalizeSignerOptions(options);
39411
- const provider = normalized.cryptoProvider ?? null;
39412
- if (!provider) {
39413
- throw new Error('No crypto provider is configured for signing');
39414
- }
39415
- this.crypto = provider;
39416
- const signingConfigOption = normalized.signingConfig;
39417
- if (signingConfigOption instanceof SigningConfig) {
39418
- this.signingConfig = signingConfigOption;
39419
- }
39420
- else if (signingConfigOption) {
39421
- this.signingConfig = new SigningConfig(signingConfigOption);
39422
- }
39423
- else {
39424
- this.signingConfig = new SigningConfig();
39425
- }
39426
- this.explicitPrivateKey = normalized.privateKeyPem;
39427
- this.explicitKeyId = normalized.keyId;
39428
- }
39429
- signEnvelope(envelope, { physicalPath }) {
39430
- if (!envelope.sid) {
39431
- throw new Error('Envelope missing sid');
39432
- }
39433
- const frame = envelope.frame;
39434
- if (frame.type === 'Data') {
39435
- const dataFrame = frame;
39436
- if (!dataFrame.pd) {
39437
- const payload = dataFrame.payload ?? '';
39438
- const payloadString = payload === '' ? '' : canonicalJson(payload);
39439
- dataFrame.pd = secureDigest(payloadString);
39440
- }
39441
- }
39442
- const digest = frameDigest(frame);
39443
- const immutable = canonicalJson(immutableHeaders(envelope));
39444
- const sidDigest = secureDigest(physicalPath);
39445
- const tbs = new Uint8Array(encodeUtf8(sidDigest).length +
39446
- 1 +
39447
- encodeUtf8(immutable).length +
39448
- 1 +
39449
- encodeUtf8(digest).length);
39450
- const sidBytes = encodeUtf8(sidDigest);
39451
- const immBytes = encodeUtf8(immutable);
39452
- const digBytes = encodeUtf8(digest);
39453
- let offset = 0;
39454
- tbs.set(sidBytes, offset);
39455
- offset += sidBytes.length;
39456
- tbs[offset] = 0x1f;
39457
- offset += 1;
39458
- tbs.set(immBytes, offset);
39459
- offset += immBytes.length;
39460
- tbs[offset] = 0x1f;
39461
- offset += 1;
39462
- tbs.set(digBytes, offset);
39463
- const privateKey = this.loadPrivateKey();
39464
- const signatureBytes = sign(tbs, privateKey);
39465
- const signature = urlsafeBase64Encode(signatureBytes);
39466
- const kid = this.determineKeyId();
39467
- const signatureHeader = {
39468
- kid,
39469
- val: signature,
39470
- alg: 'EdDSA',
39471
- };
39472
- const secHeader = envelope.sec ?? {};
39473
- secHeader.sig = signatureHeader;
39474
- envelope.sec = secHeader;
39475
- return envelope;
39476
- }
39477
- loadPrivateKey() {
39478
- const pem = this.explicitPrivateKey ??
39479
- readStringProperty(this.crypto, 'signingPrivatePem', 'signing_private_pem');
39480
- if (!pem) {
39481
- throw new Error('Crypto provider does not expose a signing private key');
39482
- }
39483
- return parseEd25519PrivateKey(pem);
39484
- }
39485
- determineKeyId() {
39486
- if (this.explicitKeyId) {
39487
- return this.explicitKeyId;
39488
- }
39489
- if (this.signingConfig.signingMaterial === SigningMaterial.X509_CHAIN) {
39490
- const certificateProvider = this
39491
- .crypto;
39492
- const jwk = certificateProvider.nodeJwk?.();
39493
- if (jwk && typeof jwk === 'object' && 'kid' in jwk && 'x5c' in jwk) {
39494
- const kid = jwk.kid;
39495
- if (typeof kid === 'string' && kid.length > 0) {
39496
- return kid;
39497
- }
39498
- }
39499
- }
39500
- const fallback = readStringProperty(this.crypto, 'signatureKeyId', 'signature_key_id');
39501
- if (!fallback) {
39502
- throw new Error('Crypto provider does not expose a signature key id');
39503
- }
39504
- return fallback;
39505
- }
39506
- }
39507
-
39508
- var eddsaEnvelopeSigner = /*#__PURE__*/Object.freeze({
39509
- __proto__: null,
39510
- EdDSAEnvelopeSigner: EdDSAEnvelopeSigner
39511
- });
39512
-
39513
39513
  async function loadPublicKey(jwk, signingConfig) {
39514
39514
  if (jwk.x5c) {
39515
39515
  if (signingConfig.signingMaterial !== SigningMaterial.X509_CHAIN) {
@@ -39747,4 +39747,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
39747
39747
  WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
39748
39748
  });
39749
39749
 
39750
- export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ 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, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, 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, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
39750
+ export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ 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, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, 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, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };