Expand description
Shell execution backend abstraction.
ShellBackend is the trait boundary between the bash tool and the underlying
process management. Two implementations:
defect_tools::shell::LocalShellBackend: spawns child processes directlydefect_acp::shell::AcpShellBackend: delegates to the client via ACPterminal/*reverse requests
Assembly is handled in the defect-acp session/new handler — it selects the backend
based on the client’s ClientCapabilities::terminal negotiation result and injects
it into crate::session::AgentCore::create_session.
Structs§
- Noop
Shell Backend - A no-op shell backend for testing only. All methods return
ShellError::NotPermitted, allowing test scenarios that require anArc<dyn ShellBackend>(without actually running a shell tool) to skip setup. - Shell
Output - A snapshot result of
ShellBackend::output. - Terminal
Exit Status - Exit status of a terminal process.
- Terminal
Id - A terminal handle. Internally, in the backend, it maps to a PID + monotonic counter
(local) or an ACP schema’s
TerminalId(acp).
Enums§
- Shell
Error - Errors from the shell backend.
Traits§
- Shell
Backend - Shell backend trait.