pub struct Session { /* private fields */ }Expand description
One driven agent session. Owns the conversation history for the run (ephemeral).
Construct with Session::new, then call Session::run (or
Session::run_text) to drive one run to a terminal state. run is
infallible — every terminal condition (including provider and Fatal tool
errors) is captured in the returned Report’s status/error, so a caller
gets a structured result every time (locode-exec maps status → exit code).
Implementations§
Source§impl Session
impl Session
Sourcepub fn new(
provider: Arc<dyn Provider>,
registry: Registry,
preamble: Vec<Message>,
config: EngineConfig,
sink: Box<dyn EventSink>,
) -> Self
pub fn new( provider: Arc<dyn Provider>, registry: Registry, preamble: Vec<Message>, config: EngineConfig, sink: Box<dyn EventSink>, ) -> Self
Assemble a session from its parts.
preamble is the base System + Developer messages (the pack supplies
these); provider/sink are trait objects so the binary can select them at
runtime.
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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