Skip to content

Function: resolveConnectorCredentials()

Makaio Framework


Makaio Framework / ai-adapters-core/config / resolveConnectorCredentials

resolveConnectorCredentials(bus, credentialRefs): Promise<Record<string, string>>

Defined in: ../../../adapters/core/src/config/resolve-connector-credentials.ts:26

Resolve credential references to plaintext values at the connector layer.

Opens an encrypted DirectChannel, resolves all refs in parallel, and closes the channel after use. Connectors call this during initialization or credential rotation — plaintext never leaves the connector.

Returns an empty object immediately when credentialRefs is empty, avoiding an unnecessary channel round-trip. Partial failures are tolerated: refs that fail to resolve are omitted and logged. Callers must still validate any required credential fields before using the returned record to build env or client config.

CredentialBusContextProvider

Bus instance with context access for channel token retrieval

Record<string, CredentialRef>

Credential refs keyed by field name

Promise<Record<string, string>>

Plaintext credential values keyed by field name