# Swactor Managed Process Specification Id: 8 Last modified: c705c7428960d287f190cad6bfbf57c193da31df Last reviewed: > Any edit to this spec must update `Last modified` above to the current `git HEAD` commit. `swactor-process` provides a Swactor actor interface for launching, supervising, stopping, and observing one operating-system child process per process actor. The crate owns process lifecycle/control only. Child stdin is not managed. Stdout and stderr are observed as uninterpreted process output events (`ProcessOutput::Stdout`/`Stderr`). --- ## 1. Public API The crate exports: ```text ProcessSpec ProcessLifecycleObservability ProcessOutputConfig ProcessCommand ProcessOutput ExitStatus spawn_local_process send_process_command ``` ### 1.1 ProcessSpec ```text ProcessSpec { command: String, args: Vec, env: HashMap, working_dir: Option, label: Option, } ``` `command` is passed directly to `std::process::Command::new`. `args` are passed as direct argv entries. The crate does not split, quote, unquote, expand, or shell-parse argument strings. `env` contains child environment overrides. `working_dir`, when present, is passed as the child current working directory. `label`, when present, is the lifecycle telemetry label source. When `label` is absent, the label source is the basename of `command`. ### 1.2 ProcessOutputConfig ```text ProcessOutputConfig::disabled(upstream: ActorAddress) -> ProcessOutputConfig ProcessOutputConfig::telemetry_mirror( upstream: ActorAddress, producer: TelemetryProducer, ) -> ProcessOutputConfig ProcessOutputConfig::upstream(&self) -> ActorAddress ProcessOutputConfig::observability(&self) -> ProcessLifecycleObservability ``` `upstream` is the actor address that receives every public `ProcessOutput`. `disabled` sends only upstream `ProcessOutput`. `telemetry_mirror` sends every `ProcessOutput` upstream, mirrors lifecycle records to `proc.