Skip to main content

ExecutorContext

Struct ExecutorContext 

Source
pub struct ExecutorContext<'a> {
    pub volume_root: &'a Path,
    pub run_id: &'a str,
    pub worktree: &'a Path,
    pub event_log: &'a EventLog,
    pub inputs: &'a [Input],
    pub default_model: Option<&'a str>,
    pub claude_bin: Option<&'a Path>,
    pub default_node_timeout: Duration,
    pub gate_timeout: Duration,
}
Expand description

Inputs the executor needs that span every dispatch call on one run.

Built once by Unit 12’s omne run handler and threaded through every node. Borrowed data everywhere; the executor never needs ownership.

Fields§

§volume_root: &'a Path

.omne/ volume root. Resolves worktree + events paths.

§run_id: &'a str

run_id (e.g. feature-01arz3ndektsv4rrffq69g5fa0).

§worktree: &'a Path

Per-run worktree cwd (.omne/wt/<run_id>). All subprocesses spawn with this as their cwd.

§event_log: &'a EventLog

Append-only log; executor emits node.* + gate.passed through it.

§inputs: &'a [Input]

--input k=v pairs. Bash nodes export these as OMNE_INPUT_<KEY>; AI nodes receive them via the gate hook env and the pipe-level prompt template (not interpolated at the runner in v1 — the pipe body references them).

§default_model: Option<&'a str>

Pipe-level default_model:. AI nodes inherit it unless they specify their own model:.

§claude_bin: Option<&'a Path>

Optional claude binary override, mainly a test seam.

§default_node_timeout: Duration

Wall-clock budget when a node does not override timeout:. Defaults to DEFAULT_NODE_TIMEOUT.

§gate_timeout: Duration

Wall-clock budget for gate hook execution. Defaults to GATE_TIMEOUT (60s per plan R12). Exposed on the context so integration tests can drive a short gate-timeout path without waiting a full minute.

Implementations§

Source§

impl<'a> ExecutorContext<'a>

Source

pub fn new( volume_root: &'a Path, run_id: &'a str, worktree: &'a Path, event_log: &'a EventLog, inputs: &'a [Input], ) -> Self

Convenience constructor that fills in the plan-default wall-clock budgets. worktree is typically .omne/wt/<run_id> — the runner computes it once and threads it through.

Auto Trait Implementations§

§

impl<'a> Freeze for ExecutorContext<'a>

§

impl<'a> RefUnwindSafe for ExecutorContext<'a>

§

impl<'a> Send for ExecutorContext<'a>

§

impl<'a> Sync for ExecutorContext<'a>

§

impl<'a> Unpin for ExecutorContext<'a>

§

impl<'a> UnsafeUnpin for ExecutorContext<'a>

§

impl<'a> UnwindSafe for ExecutorContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V