pub struct Invocation<'a> {
pub cwd: &'a Path,
pub prompt: &'a str,
pub timeout: Duration,
pub allow_write: bool,
pub sessions: bool,
pub artifacts: &'a Path,
pub stem: &'a str,
pub run: &'a str,
pub node: &'a str,
pub cache_dir: Option<&'a Path>,
pub attachments: &'a [PathBuf],
}Expand description
One agent invocation.
Fields§
§cwd: &'a PathWorking directory. Always a real checkout, so every CLI can read the repository without per-vendor “extra directory” flags.
prompt: &'a strThe full prompt.
timeout: DurationWall-clock limit; the process tree is killed when it elapses.
allow_write: boolMay the agent modify files? Judges and reviewers may not.
sessions: boolContinue this seat’s conversation when the CLI supports it.
artifacts: &'a PathDirectory for prompt / stdout / stderr artifacts.
stem: &'a strArtifact filename stem.
run: &'a strRun this invocation belongs to. Exported as MAGI_RUN so an agent that
files a task with magi task add is attributed to the run that was
paying for it, rather than looking like a human wandered by.
node: &'a strGraph node being executed, e.g. implement or review. Exported as
MAGI_NODE for the same reason: “who asked for this” is the first
question about an autonomously created task.
cache_dir: Option<&'a Path>Shared build cache the seat should build into, from the rendered
CARGO_TARGET_DIR= in the verify commands. Exported as
CARGO_TARGET_DIR so the implementer’s compile lands inside the same
directory verify reads back from - one cache, one prune, and the
build the agent just paid for is the build the gate reuses.
attachments: &'a [PathBuf]Absolute paths of images the operator attached to this conversation,
outside cwd - see chat/talk’s attachments_dir. Empty for every
invocation that is not a chat or talk turn. [build_command] uses
this only to decide whether a CLI’s sandbox needs widening to read
them; the prompt text naming each path and its mime is built by the
caller, not here.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Invocation<'a>
impl<'a> RefUnwindSafe for Invocation<'a>
impl<'a> Send for Invocation<'a>
impl<'a> Sync for Invocation<'a>
impl<'a> Unpin for Invocation<'a>
impl<'a> UnsafeUnpin for Invocation<'a>
impl<'a> UnwindSafe for Invocation<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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