pub fn register(opts: RegisterOptions<'_>) -> ProcessRegistrationExpand description
Register a new process entry in zag’s ProcessStore and return a
ProcessRegistration holding the proc_id and the env vars to inject
into the agent subprocess.
Reads ZAG_PROCESS_ID / ZAG_SESSION_ID from the current process env to
record parent-process linkage for nested invocations.
The entry is registered with pid = std::process::id() (the caller’s
pid). Wire ProcessRegistration::on_spawn_hook to the agent so the pid
is retargeted to the agent subprocess once it spawns.