prefactor_core.runtime module
prefactor_core.runtime module
Section titled “prefactor_core.runtime module”Runtime environment collection for agent version registration.
Provides build_runtime_environment() which collects OS, Python
runtime, and SDK version information into the dict format expected by
the Prefactor API’s agent_version.runtime_environment field.
prefactor_core.runtime.build_runtime_environment(sdk_header_entry: str | None = None) → dict
Section titled “prefactor_core.runtime.build_runtime_environment(sdk_header_entry: str | None = None) → dict”Build the runtime_environment dict for agent_version.
Parses sdk_header_entry (a space-separated list of "pkg@ver"
tokens as set by upstream adaptors) into agent_sdk entries.
Always includes prefactor_sdk, os, and runtime.
- Parameters:
sdk_header_entry – Space-separated SDK header string set by
upstream adaptors (e.g.
"prefactor-langchain@0.2.7"). The trailingprefactor-core@...self-entry added by the client is automatically stripped fromagent_sdk. - Returns:
A dict with keys
agent_sdk,os,prefactor_sdk, andruntime, suitable for use as theruntime_environmentfield ofagent_version.