Expand description
Shellout dispatcher that wraps the bash driver-lib contract.
§Design: the shellout seam (grilled decision 8)
The Rust Dispatcher trait exists so a future daemon/PTY implementation can
be wired in as a drop-in replacement without touching the loop runtime or the
TargetQueue. This file implements the bash-shellout side only: it sources
driver-<name>.sh and calls driver_invoke, delegating all session logic to
the bash lib. The Rust side NEVER reimplements driver behavior; it only manages
process lifecycle, env passthrough, and exit-code collection.
The seam is stable once the trait is locked (Task 1.1). A future PTY
dispatcher can implement Dispatcher + Session and be swapped in by the
CLI flag --dispatcher pty without changing any other code.
§Binary resolution (preflight)
Mirrors scripts/run-target-loop.sh:144-150. The Rust side validates the
driver whitelist and binary availability before any dispatch, so a missing
binary fails loudly at startup rather than inside iteration N.
Structs§
- Shellout
Dispatcher - Dispatcher that sources a driver lib and calls
driver_invokein bash. - Shellout
Session - A live session wrapping a bash
driver_invokechild process.
Functions§
- driver_
default_ max - Query
driver_default_max()from the driver lib via a single bash shellout. - preflight
- Validate the driver name and confirm the driver lib file exists, the
driver binary is on PATH, and the lib defines
driver_invoke. - resolve_
driver_ binary - Resolve the binary name for a given driver name.
- which_
binary - Walk
$PATHto find a binary. ReturnsSome(path)on success. Does not use an external crate; pure std.