pub struct RunContext {
pub trace_id: String,
pub shared_state: Option<Arc<Mutex<Value>>>,
}Expand description
Orchestrator run context.
trace_id propagates across multi-agent / cross-step call chains (P1-4);
shared_state provides a JSON workspace shared across steps.
Fields§
§trace_id: StringTrace ID: shared across the whole call chain, for log/audit/metric correlation.
Workspace shared across steps (optional).
Implementations§
Source§impl RunContext
impl RunContext
Sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Creates a context, auto-generating trace_id.
Carries the shared workspace.
Sourcepub fn from_config(config: &RunnableConfig) -> Self
pub fn from_config(config: &RunnableConfig) -> Self
Extracts trace_id from the LCEL RunnableConfig (reads
metadata["trace_id"]), generating one if missing. Used to thread the
LCEL pipeline’s trace through to the orchestrator.
Trait Implementations§
Source§impl Clone for RunContext
impl Clone for RunContext
Source§fn clone(&self) -> RunContext
fn clone(&self) -> RunContext
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 Freeze for RunContext
impl RefUnwindSafe for RunContext
impl Send for RunContext
impl Sync for RunContext
impl Unpin for RunContext
impl UnsafeUnpin for RunContext
impl UnwindSafe for RunContext
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