Event formatting and filtering helpers shared by zag listen, the
library-side streaming builder options, and any consumer that wants to
render AgentLogEvent values.
Helper for registering an agent process in zag’s ProcessStore and
producing the env vars (ZAG_PROCESS_ID, ZAG_SESSION_ID, etc.) that
zag ps kill self / zig self terminate use to resolve the running
agent from inside the agent’s own subshell.