Skip to content

Function: resolveSessionEnvironment()

Makaio Framework


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

resolveSessionEnvironment(options): Promise<SessionEnvironmentResult>

Defined in: ../../../adapters/core/src/config/resolve-session-environment.ts:105

Resolve credentials, build credential environment variables, and locate the client binary — the three-step pattern shared by subprocess connectors.

Encapsulates:

  1. resolveConnectorCredentials(bus, credentialRefs) — opens an encrypted DirectChannel, resolves each ref, and closes the channel.
  2. buildCredentialEnv(credentials, credentialEnvVars) — maps credential values to subprocess env var names.
  3. resolveClientBinary(clientId) — dispatches client.resolveBinary on the static bus; returns undefined in framework-only boot.

The returned SessionEnvironmentResult includes every intermediate value so callers with non-standard composition strategies (e.g. connectors that treat binary env as optional or pass credentials through a different channel) can compose the final env themselves.

SessionEnvironmentOptions

Session environment resolution options

Promise<SessionEnvironmentResult>

Resolved credentials, credential env, binary execution context, and merged spawn environment