Expand description
Process execution abstraction for dependency injection.
This module provides a trait-based abstraction for executing external processes, allowing production code to use real processes and test code to use mocks. This follows the same pattern as AppEffectHandler for dependency injection.
§Purpose
- Production:
RealProcessExecutorexecutes actual commands usingstd::process::Command - Tests:
MockProcessExecutorcaptures calls and returns controlled results
§Benefits
- Test isolation: Tests don’t spawn real processes
- Determinism: Tests produce consistent results
- Speed: Tests run faster without subprocess overhead
- Mockability: Full control over process behavior in tests
Structs§
- Agent
Child Handle - Result of spawning an agent process.
- Agent
Command Result - Result of an agent command execution (for testing).
- Agent
Spawn Config - Configuration for spawning an agent process with streaming support.
- Process
Output - Output from an executed process.
- Real
Agent Child - Wrapper for real
std::process::Child. - Real
Process Executor - Real process executor that uses
std::process::Command.
Traits§
- Agent
Child - Trait for interacting with a spawned agent child process.
- Process
Executor - Trait for executing external processes.