pub struct AgentContext {
pub item_id: String,
pub worktree_path: PathBuf,
pub worktree_name: String,
pub variables: HashMap<String, String>,
pub shell_output: Option<String>,
pub environment: ExecutionEnvironment,
pub retry_count: u32,
pub captured_outputs: HashMap<String, String>,
pub iteration_vars: HashMap<String, String>,
pub variable_store: VariableStore,
}Expand description
Context for agent execution
Fields§
§item_id: StringUnique identifier for this agent
worktree_path: PathBufPath to the agent’s isolated worktree
worktree_name: StringName of the agent’s worktree
variables: HashMap<String, String>Variables available for interpolation
shell_output: Option<String>Last shell command output
environment: ExecutionEnvironmentEnvironment for command execution
retry_count: u32Current retry count for failed commands
captured_outputs: HashMap<String, String>Captured outputs from previous steps
iteration_vars: HashMap<String, String>Iteration-specific variables
variable_store: VariableStoreVariable store for structured capture data
Implementations§
Source§impl AgentContext
impl AgentContext
Sourcepub fn new(
item_id: String,
worktree_path: PathBuf,
worktree_name: String,
environment: ExecutionEnvironment,
) -> Self
pub fn new( item_id: String, worktree_path: PathBuf, worktree_name: String, environment: ExecutionEnvironment, ) -> Self
Create a new agent context
Sourcepub fn update_with_output(&mut self, output: Option<String>)
pub fn update_with_output(&mut self, output: Option<String>)
Update context with command output
Sourcepub fn to_interpolation_context(&self) -> InterpolationContext
pub fn to_interpolation_context(&self) -> InterpolationContext
Convert to InterpolationContext
Sourcepub async fn to_variable_context(&self) -> VariableContext
pub async fn to_variable_context(&self) -> VariableContext
Convert to enhanced variable context
Trait Implementations§
Source§impl Clone for AgentContext
impl Clone for AgentContext
Source§fn clone(&self) -> AgentContext
fn clone(&self) -> AgentContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AgentContext
impl !UnwindSafe for AgentContext
impl Freeze for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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 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>
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