Skip to content

Function: buildRuntimeEnvironment()

Prefactor TypeScript SDK


Prefactor TypeScript SDK / @prefactor/core / buildRuntimeEnvironment

buildRuntimeEnvironment(sdkHeaderEntry?): RuntimeEnvironment

Defined in: packages/core/src/runtime-environment.ts:32

Builds the runtime_environment object for agent_version registration.

Parses sdkHeaderEntry (a space-separated list of "pkg@ver" tokens set by upstream adaptors) into agent_sdk entries, stripping the core SDK self-entry. Always includes prefactor_sdk, os, and runtime.

string

Space-separated SDK header string set by upstream adaptors (e.g. "@prefactor/langchain@2.0.0"). The core self-entry (@prefactor/core@...) is automatically stripped from agent_sdk.

RuntimeEnvironment

Runtime environment metadata for the agent_version payload.