@naylence/runtime 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.cjs +44 -2
- package/dist/browser/index.mjs +44 -3
- package/dist/cjs/_env-shim.js +1 -0
- package/dist/cjs/naylence/fame/fabric/fabric-registry.js +41 -0
- package/dist/cjs/naylence/fame/fabric/in-process-fame-fabric.js +3 -0
- package/dist/cjs/naylence/fame/fabric/index.js +3 -1
- package/dist/cjs/runtime-isomorphic.js +4 -1
- package/dist/cjs/version.js +2 -2
- package/dist/esm/_env-shim.js +1 -0
- package/dist/esm/naylence/fame/fabric/fabric-registry.js +37 -0
- package/dist/esm/naylence/fame/fabric/in-process-fame-fabric.js +3 -0
- package/dist/esm/naylence/fame/fabric/index.js +1 -0
- package/dist/esm/runtime-isomorphic.js +2 -0
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +43 -2
- package/dist/node/index.mjs +43 -3
- package/dist/node/node.cjs +43 -2
- package/dist/node/node.mjs +43 -3
- package/dist/types/naylence/fame/fabric/fabric-registry.d.ts +29 -0
- package/dist/types/naylence/fame/fabric/index.d.ts +1 -0
- package/dist/types/runtime-isomorphic.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/browser/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ function installProcessEnvShim() {
|
|
|
31
31
|
Object.assign(out, g.__ENV__);
|
|
32
32
|
try {
|
|
33
33
|
// import.meta is only available in ESM builds
|
|
34
|
+
// prettier-ignore
|
|
34
35
|
// @ts-ignore
|
|
35
36
|
const ie = (typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) }) !== 'undefined' && undefined) || undefined;
|
|
36
37
|
if (ie && typeof ie === 'object')
|
|
@@ -99,12 +100,12 @@ installProcessEnvShim();
|
|
|
99
100
|
// --- END ENV SHIM ---
|
|
100
101
|
|
|
101
102
|
// This file is auto-generated during build - do not edit manually
|
|
102
|
-
// Generated from package.json version: 0.3.
|
|
103
|
+
// Generated from package.json version: 0.3.9
|
|
103
104
|
/**
|
|
104
105
|
* The package version, injected at build time.
|
|
105
106
|
* @internal
|
|
106
107
|
*/
|
|
107
|
-
const VERSION = '0.3.
|
|
108
|
+
const VERSION = '0.3.9';
|
|
108
109
|
|
|
109
110
|
/**
|
|
110
111
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -28858,6 +28859,44 @@ function normalizeRouterOptions(options) {
|
|
|
28858
28859
|
return { welcomeService, prefix };
|
|
28859
28860
|
}
|
|
28860
28861
|
|
|
28862
|
+
/**
|
|
28863
|
+
* Fabric Registry
|
|
28864
|
+
*
|
|
28865
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
28866
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
28867
|
+
* without relying on the global fabric stack.
|
|
28868
|
+
*/
|
|
28869
|
+
/**
|
|
28870
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
28871
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
28872
|
+
* when no longer referenced elsewhere.
|
|
28873
|
+
*/
|
|
28874
|
+
const nodeToFabric = new WeakMap();
|
|
28875
|
+
/**
|
|
28876
|
+
* @internal
|
|
28877
|
+
* Associates a node with its fabric. This should only be called
|
|
28878
|
+
* by fabric implementations when they create or adopt a node.
|
|
28879
|
+
*
|
|
28880
|
+
* @param node - The node to associate
|
|
28881
|
+
* @param fabric - The fabric that owns the node
|
|
28882
|
+
*/
|
|
28883
|
+
function _setFabricForNode(node, fabric) {
|
|
28884
|
+
nodeToFabric.set(node, fabric);
|
|
28885
|
+
}
|
|
28886
|
+
/**
|
|
28887
|
+
* Retrieves the fabric associated with a node.
|
|
28888
|
+
*
|
|
28889
|
+
* This is useful for agents that need to access the fabric they
|
|
28890
|
+
* were registered on, particularly in environments where multiple
|
|
28891
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
28892
|
+
*
|
|
28893
|
+
* @param node - The node to look up
|
|
28894
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
28895
|
+
*/
|
|
28896
|
+
function getFabricForNode(node) {
|
|
28897
|
+
return nodeToFabric.get(node);
|
|
28898
|
+
}
|
|
28899
|
+
|
|
28861
28900
|
/**
|
|
28862
28901
|
* Browser-friendly entry point for Naylence Runtime.
|
|
28863
28902
|
*
|
|
@@ -32065,6 +32104,8 @@ class InProcessFameFabric extends core.FameFabric {
|
|
|
32065
32104
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
32066
32105
|
this._ownsNode = true;
|
|
32067
32106
|
}
|
|
32107
|
+
// Register this fabric in the registry so agents can look it up
|
|
32108
|
+
_setFabricForNode(this._currentNode, this);
|
|
32068
32109
|
if (this._ownsNode && !this._nodeStarted) {
|
|
32069
32110
|
await this.getRequiredNode().start();
|
|
32070
32111
|
this._nodeStarted = true;
|
|
@@ -41142,6 +41183,7 @@ exports.formatTimestamp = formatTimestamp;
|
|
|
41142
41183
|
exports.formatTimestampForConsole = formatTimestampForConsole$1;
|
|
41143
41184
|
exports.frameDigest = frameDigest;
|
|
41144
41185
|
exports.getCurrentEnvelope = getCurrentEnvelope;
|
|
41186
|
+
exports.getFabricForNode = getFabricForNode;
|
|
41145
41187
|
exports.getFameRoot = getFameRoot;
|
|
41146
41188
|
exports.getKeyProvider = getKeyProvider;
|
|
41147
41189
|
exports.getKeyStore = getKeyStore;
|
package/dist/browser/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ function installProcessEnvShim() {
|
|
|
29
29
|
Object.assign(out, g.__ENV__);
|
|
30
30
|
try {
|
|
31
31
|
// import.meta is only available in ESM builds
|
|
32
|
+
// prettier-ignore
|
|
32
33
|
// @ts-ignore
|
|
33
34
|
const ie = (typeof import.meta !== 'undefined' && import.meta.env) || undefined;
|
|
34
35
|
if (ie && typeof ie === 'object')
|
|
@@ -97,12 +98,12 @@ installProcessEnvShim();
|
|
|
97
98
|
// --- END ENV SHIM ---
|
|
98
99
|
|
|
99
100
|
// This file is auto-generated during build - do not edit manually
|
|
100
|
-
// Generated from package.json version: 0.3.
|
|
101
|
+
// Generated from package.json version: 0.3.9
|
|
101
102
|
/**
|
|
102
103
|
* The package version, injected at build time.
|
|
103
104
|
* @internal
|
|
104
105
|
*/
|
|
105
|
-
const VERSION = '0.3.
|
|
106
|
+
const VERSION = '0.3.9';
|
|
106
107
|
|
|
107
108
|
/**
|
|
108
109
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -28856,6 +28857,44 @@ function normalizeRouterOptions(options) {
|
|
|
28856
28857
|
return { welcomeService, prefix };
|
|
28857
28858
|
}
|
|
28858
28859
|
|
|
28860
|
+
/**
|
|
28861
|
+
* Fabric Registry
|
|
28862
|
+
*
|
|
28863
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
28864
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
28865
|
+
* without relying on the global fabric stack.
|
|
28866
|
+
*/
|
|
28867
|
+
/**
|
|
28868
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
28869
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
28870
|
+
* when no longer referenced elsewhere.
|
|
28871
|
+
*/
|
|
28872
|
+
const nodeToFabric = new WeakMap();
|
|
28873
|
+
/**
|
|
28874
|
+
* @internal
|
|
28875
|
+
* Associates a node with its fabric. This should only be called
|
|
28876
|
+
* by fabric implementations when they create or adopt a node.
|
|
28877
|
+
*
|
|
28878
|
+
* @param node - The node to associate
|
|
28879
|
+
* @param fabric - The fabric that owns the node
|
|
28880
|
+
*/
|
|
28881
|
+
function _setFabricForNode(node, fabric) {
|
|
28882
|
+
nodeToFabric.set(node, fabric);
|
|
28883
|
+
}
|
|
28884
|
+
/**
|
|
28885
|
+
* Retrieves the fabric associated with a node.
|
|
28886
|
+
*
|
|
28887
|
+
* This is useful for agents that need to access the fabric they
|
|
28888
|
+
* were registered on, particularly in environments where multiple
|
|
28889
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
28890
|
+
*
|
|
28891
|
+
* @param node - The node to look up
|
|
28892
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
28893
|
+
*/
|
|
28894
|
+
function getFabricForNode(node) {
|
|
28895
|
+
return nodeToFabric.get(node);
|
|
28896
|
+
}
|
|
28897
|
+
|
|
28859
28898
|
/**
|
|
28860
28899
|
* Browser-friendly entry point for Naylence Runtime.
|
|
28861
28900
|
*
|
|
@@ -32063,6 +32102,8 @@ class InProcessFameFabric extends FameFabric {
|
|
|
32063
32102
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
32064
32103
|
this._ownsNode = true;
|
|
32065
32104
|
}
|
|
32105
|
+
// Register this fabric in the registry so agents can look it up
|
|
32106
|
+
_setFabricForNode(this._currentNode, this);
|
|
32066
32107
|
if (this._ownsNode && !this._nodeStarted) {
|
|
32067
32108
|
await this.getRequiredNode().start();
|
|
32068
32109
|
this._nodeStarted = true;
|
|
@@ -40916,4 +40957,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
|
|
|
40916
40957
|
WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
|
|
40917
40958
|
});
|
|
40918
40959
|
|
|
40919
|
-
export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$X as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$$ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$_ as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$Y as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, 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 };
|
|
40960
|
+
export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Z as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$X as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$$ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EdDSAEnvelopeSigner, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$_ as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$Y as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFabricForNode, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, safeImport, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
|
package/dist/cjs/_env-shim.js
CHANGED
|
@@ -18,6 +18,7 @@ function installProcessEnvShim() {
|
|
|
18
18
|
Object.assign(out, g.__ENV__);
|
|
19
19
|
try {
|
|
20
20
|
// import.meta is only available in ESM builds
|
|
21
|
+
// prettier-ignore
|
|
21
22
|
// @ts-ignore
|
|
22
23
|
const ie = (typeof import.meta !== 'undefined' && import.meta.env) || undefined;
|
|
23
24
|
if (ie && typeof ie === 'object')
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Fabric Registry
|
|
4
|
+
*
|
|
5
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
6
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
7
|
+
* without relying on the global fabric stack.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports._setFabricForNode = _setFabricForNode;
|
|
11
|
+
exports.getFabricForNode = getFabricForNode;
|
|
12
|
+
/**
|
|
13
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
14
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
15
|
+
* when no longer referenced elsewhere.
|
|
16
|
+
*/
|
|
17
|
+
const nodeToFabric = new WeakMap();
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* Associates a node with its fabric. This should only be called
|
|
21
|
+
* by fabric implementations when they create or adopt a node.
|
|
22
|
+
*
|
|
23
|
+
* @param node - The node to associate
|
|
24
|
+
* @param fabric - The fabric that owns the node
|
|
25
|
+
*/
|
|
26
|
+
function _setFabricForNode(node, fabric) {
|
|
27
|
+
nodeToFabric.set(node, fabric);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves the fabric associated with a node.
|
|
31
|
+
*
|
|
32
|
+
* This is useful for agents that need to access the fabric they
|
|
33
|
+
* were registered on, particularly in environments where multiple
|
|
34
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
35
|
+
*
|
|
36
|
+
* @param node - The node to look up
|
|
37
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
38
|
+
*/
|
|
39
|
+
function getFabricForNode(node) {
|
|
40
|
+
return nodeToFabric.get(node);
|
|
41
|
+
}
|
|
@@ -8,6 +8,7 @@ const util_js_1 = require("../util/util.js");
|
|
|
8
8
|
const runtime_version_js_1 = require("../util/runtime-version.js");
|
|
9
9
|
const sink_service_js_1 = require("../service/sink-service.js");
|
|
10
10
|
const extended_fame_config_base_js_1 = require("../config/extended-fame-config-base.js");
|
|
11
|
+
const fabric_registry_js_1 = require("./fabric-registry.js");
|
|
11
12
|
const logger = (0, logging_js_1.getLogger)('naylence.fame.fabric.in_process');
|
|
12
13
|
function normalizeNodeConfig(config) {
|
|
13
14
|
if (config && typeof config === 'object' && !Array.isArray(config)) {
|
|
@@ -69,6 +70,8 @@ class InProcessFameFabric extends core_1.FameFabric {
|
|
|
69
70
|
this._currentNode = await node_like_factory_js_1.NodeLikeFactory.createNode(nodeConfig);
|
|
70
71
|
this._ownsNode = true;
|
|
71
72
|
}
|
|
73
|
+
// Register this fabric in the registry so agents can look it up
|
|
74
|
+
(0, fabric_registry_js_1._setFabricForNode)(this._currentNode, this);
|
|
72
75
|
if (this._ownsNode && !this._nodeStarted) {
|
|
73
76
|
await this.getRequiredNode().start();
|
|
74
77
|
this._nodeStarted = true;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FAME_FABRIC_FACTORY_BASE_TYPE = exports.InProcessFameFabricFactory = exports.InProcessFameFabric = void 0;
|
|
3
|
+
exports.getFabricForNode = exports.FAME_FABRIC_FACTORY_BASE_TYPE = exports.InProcessFameFabricFactory = exports.InProcessFameFabric = void 0;
|
|
4
4
|
var in_process_fame_fabric_js_1 = require("./in-process-fame-fabric.js");
|
|
5
5
|
Object.defineProperty(exports, "InProcessFameFabric", { enumerable: true, get: function () { return in_process_fame_fabric_js_1.InProcessFameFabric; } });
|
|
6
6
|
var in_process_fame_fabric_factory_js_1 = require("./in-process-fame-fabric-factory.js");
|
|
7
7
|
Object.defineProperty(exports, "InProcessFameFabricFactory", { enumerable: true, get: function () { return in_process_fame_fabric_factory_js_1.InProcessFameFabricFactory; } });
|
|
8
8
|
Object.defineProperty(exports, "FAME_FABRIC_FACTORY_BASE_TYPE", { enumerable: true, get: function () { return in_process_fame_fabric_factory_js_1.FAME_FABRIC_FACTORY_BASE_TYPE; } });
|
|
9
|
+
var fabric_registry_js_1 = require("./fabric-registry.js");
|
|
10
|
+
Object.defineProperty(exports, "getFabricForNode", { enumerable: true, get: function () { return fabric_registry_js_1.getFabricForNode; } });
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* expect access to the Node.js standard library.
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.__runtimePluginLoader = exports.ensureRuntimeFactoriesRegistered = exports.registerRuntimeFactories = exports.registerDefaultFactories = exports.isRegisterable = exports.operation = exports.RpcMixin = exports.createRpcProxy = exports.RpcProxy = exports.INPAGE_CONNECTOR_TYPE = exports.InPageConnector = exports._NoopFlowController = exports.WebSocketState = exports.WebSocketConnector = exports.createResource = exports.ConnectorFactory = exports.createConnectorConfig = exports.isConnectorConfig = exports.ConnectorConfigDefaults = exports.BaseAsyncConnector = exports.VERSION = void 0;
|
|
11
|
+
exports.__runtimePluginLoader = exports.getFabricForNode = exports.ensureRuntimeFactoriesRegistered = exports.registerRuntimeFactories = exports.registerDefaultFactories = exports.isRegisterable = exports.operation = exports.RpcMixin = exports.createRpcProxy = exports.RpcProxy = exports.INPAGE_CONNECTOR_TYPE = exports.InPageConnector = exports._NoopFlowController = exports.WebSocketState = exports.WebSocketConnector = exports.createResource = exports.ConnectorFactory = exports.createConnectorConfig = exports.isConnectorConfig = exports.ConnectorConfigDefaults = exports.BaseAsyncConnector = exports.VERSION = void 0;
|
|
12
12
|
const tslib_1 = require("tslib");
|
|
13
13
|
// Re-export everything from naylence-core for protocol primitives
|
|
14
14
|
tslib_1.__exportStar(require("@naylence/core"), exports);
|
|
@@ -69,6 +69,9 @@ tslib_1.__exportStar(require("./naylence/fame/placement/node-placement-strategy-
|
|
|
69
69
|
tslib_1.__exportStar(require("./naylence/fame/transport/transport-provisioner.js"), exports);
|
|
70
70
|
// Welcome service (isomorphic)
|
|
71
71
|
tslib_1.__exportStar(require("./naylence/fame/welcome/index.js"), exports);
|
|
72
|
+
// Fabric registry (for looking up fabric from node)
|
|
73
|
+
var fabric_registry_js_1 = require("./naylence/fame/fabric/fabric-registry.js");
|
|
74
|
+
Object.defineProperty(exports, "getFabricForNode", { enumerable: true, get: function () { return fabric_registry_js_1.getFabricForNode; } });
|
|
72
75
|
const runtimePluginModulePromise = Promise.resolve().then(() => tslib_1.__importStar(require('./plugin.js')));
|
|
73
76
|
const globalScope = globalThis;
|
|
74
77
|
const FACTORY_MODULE_PREFIX = '@naylence/runtime/naylence/fame/';
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated during build - do not edit manually
|
|
3
|
-
// Generated from package.json version: 0.3.
|
|
3
|
+
// Generated from package.json version: 0.3.9
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.VERSION = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* The package version, injected at build time.
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
exports.VERSION = '0.3.
|
|
10
|
+
exports.VERSION = '0.3.9';
|
package/dist/esm/_env-shim.js
CHANGED
|
@@ -15,6 +15,7 @@ export function installProcessEnvShim() {
|
|
|
15
15
|
Object.assign(out, g.__ENV__);
|
|
16
16
|
try {
|
|
17
17
|
// import.meta is only available in ESM builds
|
|
18
|
+
// prettier-ignore
|
|
18
19
|
// @ts-ignore
|
|
19
20
|
const ie = (typeof import.meta !== 'undefined' && import.meta.env) || undefined;
|
|
20
21
|
if (ie && typeof ie === 'object')
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fabric Registry
|
|
3
|
+
*
|
|
4
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
5
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
6
|
+
* without relying on the global fabric stack.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
10
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
11
|
+
* when no longer referenced elsewhere.
|
|
12
|
+
*/
|
|
13
|
+
const nodeToFabric = new WeakMap();
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* Associates a node with its fabric. This should only be called
|
|
17
|
+
* by fabric implementations when they create or adopt a node.
|
|
18
|
+
*
|
|
19
|
+
* @param node - The node to associate
|
|
20
|
+
* @param fabric - The fabric that owns the node
|
|
21
|
+
*/
|
|
22
|
+
export function _setFabricForNode(node, fabric) {
|
|
23
|
+
nodeToFabric.set(node, fabric);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the fabric associated with a node.
|
|
27
|
+
*
|
|
28
|
+
* This is useful for agents that need to access the fabric they
|
|
29
|
+
* were registered on, particularly in environments where multiple
|
|
30
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
31
|
+
*
|
|
32
|
+
* @param node - The node to look up
|
|
33
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
34
|
+
*/
|
|
35
|
+
export function getFabricForNode(node) {
|
|
36
|
+
return nodeToFabric.get(node);
|
|
37
|
+
}
|
|
@@ -5,6 +5,7 @@ import { decodeFameDataPayload, withLegacySnakeCaseKeys, } from '../util/util.js
|
|
|
5
5
|
import { resolveRuntimeVersion } from '../util/runtime-version.js';
|
|
6
6
|
import { isSinkService } from '../service/sink-service.js';
|
|
7
7
|
import { normalizeExtendedFameConfig, } from '../config/extended-fame-config-base.js';
|
|
8
|
+
import { _setFabricForNode } from './fabric-registry.js';
|
|
8
9
|
const logger = getLogger('naylence.fame.fabric.in_process');
|
|
9
10
|
function normalizeNodeConfig(config) {
|
|
10
11
|
if (config && typeof config === 'object' && !Array.isArray(config)) {
|
|
@@ -66,6 +67,8 @@ export class InProcessFameFabric extends FameFabric {
|
|
|
66
67
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
67
68
|
this._ownsNode = true;
|
|
68
69
|
}
|
|
70
|
+
// Register this fabric in the registry so agents can look it up
|
|
71
|
+
_setFabricForNode(this._currentNode, this);
|
|
69
72
|
if (this._ownsNode && !this._nodeStarted) {
|
|
70
73
|
await this.getRequiredNode().start();
|
|
71
74
|
this._nodeStarted = true;
|
|
@@ -45,6 +45,8 @@ export * from './naylence/fame/placement/node-placement-strategy-factory.js';
|
|
|
45
45
|
export * from './naylence/fame/transport/transport-provisioner.js';
|
|
46
46
|
// Welcome service (isomorphic)
|
|
47
47
|
export * from './naylence/fame/welcome/index.js';
|
|
48
|
+
// Fabric registry (for looking up fabric from node)
|
|
49
|
+
export { getFabricForNode } from './naylence/fame/fabric/fabric-registry.js';
|
|
48
50
|
const runtimePluginModulePromise = import('./plugin.js');
|
|
49
51
|
const globalScope = globalThis;
|
|
50
52
|
const FACTORY_MODULE_PREFIX = '@naylence/runtime/naylence/fame/';
|
package/dist/esm/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated during build - do not edit manually
|
|
2
|
-
// Generated from package.json version: 0.3.
|
|
2
|
+
// Generated from package.json version: 0.3.9
|
|
3
3
|
/**
|
|
4
4
|
* The package version, injected at build time.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.3.
|
|
7
|
+
export const VERSION = '0.3.9';
|
package/dist/node/index.cjs
CHANGED
|
@@ -14,12 +14,12 @@ var fastify = require('fastify');
|
|
|
14
14
|
var websocketPlugin = require('@fastify/websocket');
|
|
15
15
|
|
|
16
16
|
// This file is auto-generated during build - do not edit manually
|
|
17
|
-
// Generated from package.json version: 0.3.
|
|
17
|
+
// Generated from package.json version: 0.3.9
|
|
18
18
|
/**
|
|
19
19
|
* The package version, injected at build time.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = '0.3.
|
|
22
|
+
const VERSION = '0.3.9';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -28773,6 +28773,44 @@ function normalizeRouterOptions(options) {
|
|
|
28773
28773
|
return { welcomeService, prefix };
|
|
28774
28774
|
}
|
|
28775
28775
|
|
|
28776
|
+
/**
|
|
28777
|
+
* Fabric Registry
|
|
28778
|
+
*
|
|
28779
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
28780
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
28781
|
+
* without relying on the global fabric stack.
|
|
28782
|
+
*/
|
|
28783
|
+
/**
|
|
28784
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
28785
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
28786
|
+
* when no longer referenced elsewhere.
|
|
28787
|
+
*/
|
|
28788
|
+
const nodeToFabric = new WeakMap();
|
|
28789
|
+
/**
|
|
28790
|
+
* @internal
|
|
28791
|
+
* Associates a node with its fabric. This should only be called
|
|
28792
|
+
* by fabric implementations when they create or adopt a node.
|
|
28793
|
+
*
|
|
28794
|
+
* @param node - The node to associate
|
|
28795
|
+
* @param fabric - The fabric that owns the node
|
|
28796
|
+
*/
|
|
28797
|
+
function _setFabricForNode(node, fabric) {
|
|
28798
|
+
nodeToFabric.set(node, fabric);
|
|
28799
|
+
}
|
|
28800
|
+
/**
|
|
28801
|
+
* Retrieves the fabric associated with a node.
|
|
28802
|
+
*
|
|
28803
|
+
* This is useful for agents that need to access the fabric they
|
|
28804
|
+
* were registered on, particularly in environments where multiple
|
|
28805
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
28806
|
+
*
|
|
28807
|
+
* @param node - The node to look up
|
|
28808
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
28809
|
+
*/
|
|
28810
|
+
function getFabricForNode(node) {
|
|
28811
|
+
return nodeToFabric.get(node);
|
|
28812
|
+
}
|
|
28813
|
+
|
|
28776
28814
|
/**
|
|
28777
28815
|
* Browser-friendly entry point for Naylence Runtime.
|
|
28778
28816
|
*
|
|
@@ -30653,6 +30691,8 @@ class InProcessFameFabric extends core.FameFabric {
|
|
|
30653
30691
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
30654
30692
|
this._ownsNode = true;
|
|
30655
30693
|
}
|
|
30694
|
+
// Register this fabric in the registry so agents can look it up
|
|
30695
|
+
_setFabricForNode(this._currentNode, this);
|
|
30656
30696
|
if (this._ownsNode && !this._nodeStarted) {
|
|
30657
30697
|
await this.getRequiredNode().start();
|
|
30658
30698
|
this._nodeStarted = true;
|
|
@@ -41043,6 +41083,7 @@ exports.formatTimestamp = formatTimestamp;
|
|
|
41043
41083
|
exports.formatTimestampForConsole = formatTimestampForConsole$1;
|
|
41044
41084
|
exports.frameDigest = frameDigest;
|
|
41045
41085
|
exports.getCurrentEnvelope = getCurrentEnvelope;
|
|
41086
|
+
exports.getFabricForNode = getFabricForNode;
|
|
41046
41087
|
exports.getFameRoot = getFameRoot;
|
|
41047
41088
|
exports.getKeyProvider = getKeyProvider;
|
|
41048
41089
|
exports.getKeyStore = getKeyStore;
|
package/dist/node/index.mjs
CHANGED
|
@@ -13,12 +13,12 @@ import fastify from 'fastify';
|
|
|
13
13
|
import websocketPlugin from '@fastify/websocket';
|
|
14
14
|
|
|
15
15
|
// This file is auto-generated during build - do not edit manually
|
|
16
|
-
// Generated from package.json version: 0.3.
|
|
16
|
+
// Generated from package.json version: 0.3.9
|
|
17
17
|
/**
|
|
18
18
|
* The package version, injected at build time.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
const VERSION = '0.3.
|
|
21
|
+
const VERSION = '0.3.9';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -28772,6 +28772,44 @@ function normalizeRouterOptions(options) {
|
|
|
28772
28772
|
return { welcomeService, prefix };
|
|
28773
28773
|
}
|
|
28774
28774
|
|
|
28775
|
+
/**
|
|
28776
|
+
* Fabric Registry
|
|
28777
|
+
*
|
|
28778
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
28779
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
28780
|
+
* without relying on the global fabric stack.
|
|
28781
|
+
*/
|
|
28782
|
+
/**
|
|
28783
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
28784
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
28785
|
+
* when no longer referenced elsewhere.
|
|
28786
|
+
*/
|
|
28787
|
+
const nodeToFabric = new WeakMap();
|
|
28788
|
+
/**
|
|
28789
|
+
* @internal
|
|
28790
|
+
* Associates a node with its fabric. This should only be called
|
|
28791
|
+
* by fabric implementations when they create or adopt a node.
|
|
28792
|
+
*
|
|
28793
|
+
* @param node - The node to associate
|
|
28794
|
+
* @param fabric - The fabric that owns the node
|
|
28795
|
+
*/
|
|
28796
|
+
function _setFabricForNode(node, fabric) {
|
|
28797
|
+
nodeToFabric.set(node, fabric);
|
|
28798
|
+
}
|
|
28799
|
+
/**
|
|
28800
|
+
* Retrieves the fabric associated with a node.
|
|
28801
|
+
*
|
|
28802
|
+
* This is useful for agents that need to access the fabric they
|
|
28803
|
+
* were registered on, particularly in environments where multiple
|
|
28804
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
28805
|
+
*
|
|
28806
|
+
* @param node - The node to look up
|
|
28807
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
28808
|
+
*/
|
|
28809
|
+
function getFabricForNode(node) {
|
|
28810
|
+
return nodeToFabric.get(node);
|
|
28811
|
+
}
|
|
28812
|
+
|
|
28775
28813
|
/**
|
|
28776
28814
|
* Browser-friendly entry point for Naylence Runtime.
|
|
28777
28815
|
*
|
|
@@ -30652,6 +30690,8 @@ class InProcessFameFabric extends FameFabric {
|
|
|
30652
30690
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
30653
30691
|
this._ownsNode = true;
|
|
30654
30692
|
}
|
|
30693
|
+
// Register this fabric in the registry so agents can look it up
|
|
30694
|
+
_setFabricForNode(this._currentNode, this);
|
|
30655
30695
|
if (this._ownsNode && !this._nodeStarted) {
|
|
30656
30696
|
await this.getRequiredNode().start();
|
|
30657
30697
|
this._nodeStarted = true;
|
|
@@ -40830,4 +40870,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
|
|
|
40830
40870
|
WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
|
|
40831
40871
|
});
|
|
40832
40872
|
|
|
40833
|
-
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$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, 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, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, 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 };
|
|
40873
|
+
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$10 as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, 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, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFabricForNode, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, safeImport, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
|
package/dist/node/node.cjs
CHANGED
|
@@ -5563,12 +5563,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
|
|
|
5563
5563
|
}
|
|
5564
5564
|
|
|
5565
5565
|
// This file is auto-generated during build - do not edit manually
|
|
5566
|
-
// Generated from package.json version: 0.3.
|
|
5566
|
+
// Generated from package.json version: 0.3.9
|
|
5567
5567
|
/**
|
|
5568
5568
|
* The package version, injected at build time.
|
|
5569
5569
|
* @internal
|
|
5570
5570
|
*/
|
|
5571
|
-
const VERSION = '0.3.
|
|
5571
|
+
const VERSION = '0.3.9';
|
|
5572
5572
|
|
|
5573
5573
|
/**
|
|
5574
5574
|
* Fame errors module - Fame protocol specific error classes
|
|
@@ -29898,6 +29898,44 @@ function normalizeRouterOptions(options) {
|
|
|
29898
29898
|
return { welcomeService, prefix };
|
|
29899
29899
|
}
|
|
29900
29900
|
|
|
29901
|
+
/**
|
|
29902
|
+
* Fabric Registry
|
|
29903
|
+
*
|
|
29904
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
29905
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
29906
|
+
* without relying on the global fabric stack.
|
|
29907
|
+
*/
|
|
29908
|
+
/**
|
|
29909
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
29910
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
29911
|
+
* when no longer referenced elsewhere.
|
|
29912
|
+
*/
|
|
29913
|
+
const nodeToFabric = new WeakMap();
|
|
29914
|
+
/**
|
|
29915
|
+
* @internal
|
|
29916
|
+
* Associates a node with its fabric. This should only be called
|
|
29917
|
+
* by fabric implementations when they create or adopt a node.
|
|
29918
|
+
*
|
|
29919
|
+
* @param node - The node to associate
|
|
29920
|
+
* @param fabric - The fabric that owns the node
|
|
29921
|
+
*/
|
|
29922
|
+
function _setFabricForNode(node, fabric) {
|
|
29923
|
+
nodeToFabric.set(node, fabric);
|
|
29924
|
+
}
|
|
29925
|
+
/**
|
|
29926
|
+
* Retrieves the fabric associated with a node.
|
|
29927
|
+
*
|
|
29928
|
+
* This is useful for agents that need to access the fabric they
|
|
29929
|
+
* were registered on, particularly in environments where multiple
|
|
29930
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
29931
|
+
*
|
|
29932
|
+
* @param node - The node to look up
|
|
29933
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
29934
|
+
*/
|
|
29935
|
+
function getFabricForNode(node) {
|
|
29936
|
+
return nodeToFabric.get(node);
|
|
29937
|
+
}
|
|
29938
|
+
|
|
29901
29939
|
/**
|
|
29902
29940
|
* Browser-friendly entry point for Naylence Runtime.
|
|
29903
29941
|
*
|
|
@@ -33532,6 +33570,8 @@ class InProcessFameFabric extends core.FameFabric {
|
|
|
33532
33570
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
33533
33571
|
this._ownsNode = true;
|
|
33534
33572
|
}
|
|
33573
|
+
// Register this fabric in the registry so agents can look it up
|
|
33574
|
+
_setFabricForNode(this._currentNode, this);
|
|
33535
33575
|
if (this._ownsNode && !this._nodeStarted) {
|
|
33536
33576
|
await this.getRequiredNode().start();
|
|
33537
33577
|
this._nodeStarted = true;
|
|
@@ -43279,6 +43319,7 @@ exports.formatTimestamp = formatTimestamp;
|
|
|
43279
43319
|
exports.formatTimestampForConsole = formatTimestampForConsole$1;
|
|
43280
43320
|
exports.frameDigest = frameDigest;
|
|
43281
43321
|
exports.getCurrentEnvelope = getCurrentEnvelope;
|
|
43322
|
+
exports.getFabricForNode = getFabricForNode;
|
|
43282
43323
|
exports.getFameRoot = getFameRoot;
|
|
43283
43324
|
exports.getHttpListenerInstance = getHttpListenerInstance;
|
|
43284
43325
|
exports.getInPageListenerInstance = getInPageListenerInstance;
|
package/dist/node/node.mjs
CHANGED
|
@@ -5562,12 +5562,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
|
|
|
5562
5562
|
}
|
|
5563
5563
|
|
|
5564
5564
|
// This file is auto-generated during build - do not edit manually
|
|
5565
|
-
// Generated from package.json version: 0.3.
|
|
5565
|
+
// Generated from package.json version: 0.3.9
|
|
5566
5566
|
/**
|
|
5567
5567
|
* The package version, injected at build time.
|
|
5568
5568
|
* @internal
|
|
5569
5569
|
*/
|
|
5570
|
-
const VERSION = '0.3.
|
|
5570
|
+
const VERSION = '0.3.9';
|
|
5571
5571
|
|
|
5572
5572
|
/**
|
|
5573
5573
|
* Fame errors module - Fame protocol specific error classes
|
|
@@ -29897,6 +29897,44 @@ function normalizeRouterOptions(options) {
|
|
|
29897
29897
|
return { welcomeService, prefix };
|
|
29898
29898
|
}
|
|
29899
29899
|
|
|
29900
|
+
/**
|
|
29901
|
+
* Fabric Registry
|
|
29902
|
+
*
|
|
29903
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
29904
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
29905
|
+
* without relying on the global fabric stack.
|
|
29906
|
+
*/
|
|
29907
|
+
/**
|
|
29908
|
+
* WeakMap to store the node-to-fabric mapping.
|
|
29909
|
+
* Using WeakMap ensures that nodes can be garbage collected
|
|
29910
|
+
* when no longer referenced elsewhere.
|
|
29911
|
+
*/
|
|
29912
|
+
const nodeToFabric = new WeakMap();
|
|
29913
|
+
/**
|
|
29914
|
+
* @internal
|
|
29915
|
+
* Associates a node with its fabric. This should only be called
|
|
29916
|
+
* by fabric implementations when they create or adopt a node.
|
|
29917
|
+
*
|
|
29918
|
+
* @param node - The node to associate
|
|
29919
|
+
* @param fabric - The fabric that owns the node
|
|
29920
|
+
*/
|
|
29921
|
+
function _setFabricForNode(node, fabric) {
|
|
29922
|
+
nodeToFabric.set(node, fabric);
|
|
29923
|
+
}
|
|
29924
|
+
/**
|
|
29925
|
+
* Retrieves the fabric associated with a node.
|
|
29926
|
+
*
|
|
29927
|
+
* This is useful for agents that need to access the fabric they
|
|
29928
|
+
* were registered on, particularly in environments where multiple
|
|
29929
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
29930
|
+
*
|
|
29931
|
+
* @param node - The node to look up
|
|
29932
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
29933
|
+
*/
|
|
29934
|
+
function getFabricForNode(node) {
|
|
29935
|
+
return nodeToFabric.get(node);
|
|
29936
|
+
}
|
|
29937
|
+
|
|
29900
29938
|
/**
|
|
29901
29939
|
* Browser-friendly entry point for Naylence Runtime.
|
|
29902
29940
|
*
|
|
@@ -33531,6 +33569,8 @@ class InProcessFameFabric extends FameFabric {
|
|
|
33531
33569
|
this._currentNode = await NodeLikeFactory.createNode(nodeConfig);
|
|
33532
33570
|
this._ownsNode = true;
|
|
33533
33571
|
}
|
|
33572
|
+
// Register this fabric in the registry so agents can look it up
|
|
33573
|
+
_setFabricForNode(this._currentNode, this);
|
|
33534
33574
|
if (this._ownsNode && !this._nodeStarted) {
|
|
33535
33575
|
await this.getRequiredNode().start();
|
|
33536
33576
|
this._nodeStarted = true;
|
|
@@ -43048,4 +43088,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
|
|
|
43048
43088
|
WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
|
|
43049
43089
|
});
|
|
43050
43090
|
|
|
43051
|
-
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, DefaultHttpServer, 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$2 as ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$2 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, FAME_FABRIC_FACTORY_BASE_TYPE, 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, HttpListener, HttpStatelessConnector, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageListener, InProcessFameFabric, InProcessFameFabricFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, QueueFullError, 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, SQLiteKeyValueStore, SQLiteStorageProvider, 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_LISTENER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportListener, TransportListenerFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketListener, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createJwksRouter, createLogicalUri, createNodeDeliveryContext, createApp as createOAuth2ServerApp, createOAuth2TokenRouter, createOpenIDConfigurationRouter, 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, getHttpListenerInstance, getInPageListenerInstance, getKeyProvider, getKeyStore, getLogger, getWebsocketListenerInstance, 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, normalizeExtendedFameConfig, 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, main as runOAuth2Server, 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 };
|
|
43091
|
+
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, DefaultHttpServer, 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$2 as ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$2 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, FAME_FABRIC_FACTORY_BASE_TYPE, 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, HttpListener, HttpStatelessConnector, INPAGE_CONNECTION_GRANT_TYPE, INPAGE_CONNECTOR_TYPE, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageListener, InProcessFameFabric, InProcessFameFabricFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NoopTrustStoreProvider, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, QueueFullError, 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, SQLiteKeyValueStore, SQLiteStorageProvider, 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_LISTENER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportListener, TransportListenerFactory, TransportProvisionerFactory, TrustStoreProviderFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketListener, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createJwksRouter, createLogicalUri, createNodeDeliveryContext, createApp as createOAuth2ServerApp, createOAuth2TokenRouter, createOpenIDConfigurationRouter, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFabricForNode, getFameRoot, getHttpListenerInstance, getInPageListenerInstance, getKeyProvider, getKeyStore, getLogger, getWebsocketListenerInstance, 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, normalizeExtendedFameConfig, 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, main as runOAuth2Server, 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 };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fabric Registry
|
|
3
|
+
*
|
|
4
|
+
* Provides a mapping from nodes to their associated fabrics.
|
|
5
|
+
* This allows agents to retrieve the fabric they were registered on
|
|
6
|
+
* without relying on the global fabric stack.
|
|
7
|
+
*/
|
|
8
|
+
import type { FameFabric } from '@naylence/core';
|
|
9
|
+
import type { NodeLike } from '../node/node-like.js';
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
* Associates a node with its fabric. This should only be called
|
|
13
|
+
* by fabric implementations when they create or adopt a node.
|
|
14
|
+
*
|
|
15
|
+
* @param node - The node to associate
|
|
16
|
+
* @param fabric - The fabric that owns the node
|
|
17
|
+
*/
|
|
18
|
+
export declare function _setFabricForNode(node: NodeLike, fabric: FameFabric): void;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the fabric associated with a node.
|
|
21
|
+
*
|
|
22
|
+
* This is useful for agents that need to access the fabric they
|
|
23
|
+
* were registered on, particularly in environments where multiple
|
|
24
|
+
* fabrics exist (e.g., React with multiple FabricProviders).
|
|
25
|
+
*
|
|
26
|
+
* @param node - The node to look up
|
|
27
|
+
* @returns The fabric associated with the node, or undefined if not found
|
|
28
|
+
*/
|
|
29
|
+
export declare function getFabricForNode(node: NodeLike): FameFabric | undefined;
|
|
@@ -33,5 +33,6 @@ export * from './naylence/fame/placement/node-placement-strategy.js';
|
|
|
33
33
|
export * from './naylence/fame/placement/node-placement-strategy-factory.js';
|
|
34
34
|
export * from './naylence/fame/transport/transport-provisioner.js';
|
|
35
35
|
export * from './naylence/fame/welcome/index.js';
|
|
36
|
+
export { getFabricForNode } from './naylence/fame/fabric/fabric-registry.js';
|
|
36
37
|
type PluginModuleLoader = (specifier: string) => Promise<Record<string, unknown>>;
|
|
37
38
|
export declare const __runtimePluginLoader: PluginModuleLoader;
|
package/dist/types/version.d.ts
CHANGED