pub struct Fx<'a> {
pub driver_target: PathBuf,
pub adapter_target: Option<PathBuf>,
pub editor: &'a dyn Fn(&Path) -> Result<()>,
pub tool_stdin: &'a mut dyn Read,
pub tool_stdout: &'a mut dyn Write,
pub tool_stderr: &'a mut dyn Write,
pub stop: &'a AtomicBool,
pub tool_injection: Option<&'a dyn ToolInjection>,
}Expand description
The binding’s injections (ARCH §3.4 “Process effects stay at the binding”). Every process-global or terminal effect a verb needs is a field here, supplied by the binding — the library reaches for none of its own.
Fields§
§driver_target: PathBufThe re-entry path for every seam that goes back through the
front door: the detached litany advance launch and the §6
successor execve (§2.11), the §3.3 tool resolver’s third hop
(<driver_target> tool <name>), and the dispatch / message
built-ins’ own re-entry. ARCH §2.11: “the driver target is
injected at the binding, not resolved by name” — the exec binding
resolves it once via std::env::current_exe, a linked host names
its own re-exec target or a PATH-resolved litany. The library
resolves none of its own.
adapter_target: Option<PathBuf>The provider-adapter target (ARCH §4.4), injected the same way as
Self::driver_target: the library resolves no binary of its own,
the binding names it. None — the exec binding’s default — leaves
today’s resolution intact (the models.yaml adapter: override,
else bz on PATH, §4.2). An embedding host that re-execs itself
as the adapter names its own target here; like an explicit override,
a named target skips the load-time version guard and the in-band
MessageStart.v handshake governs (§4.4).
editor: &'a dyn Fn(&Path) -> Result<()>The litany config $EDITOR hand-off (§2.2) — the interactive
spawn the exec binding supplies as cli::edit_in_editor.
tool_stdin: &'a mut dyn ReadThe litany tool stdin (§3.3 tool_use.input JSON).
tool_stdout: &'a mut dyn WriteThe litany tool stdout (§3.3 raw result bytes).
tool_stderr: &'a mut dyn WriteThe litany tool stderr (§3.3 stderr-concat contract).
stop: &'a AtomicBoolThe executor’s SIGTERM flag (§2.9 step 3), the driver verbs’
Deps::stop. The exec binding wires prelude::stop_flag after
prelude::install_stop_handler.
tool_injection: Option<&'a dyn ToolInjection>The binding’s tool injection (ARCH §3.3 Host-injected
tools), injected like Self::driver_target, and its one choice
of execution pipeline: None (the exec binding) spawns every tool
through the §3.3 three hops; a host supplying one has its
ToolInjection::tools declared and permitted on every request
and its ToolInjection::route answering every invocation, with
no resolution behind it. ToolInjection, DESIGN_TOOL_INJECTION §3.4.