Skip to main content

RunRequest

Struct RunRequest 

Source
pub struct RunRequest {
    pub run_id: RunId,
    pub session_id: Option<SessionId>,
    pub turn_id: Option<TurnId>,
    pub agent_id: AgentId,
    pub source: SourceRef,
    pub input: String,
    pub output_contract: Option<OutputContract>,
}
Expand description

Holds run request application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.

Fields§

§run_id: RunId

Run identifier used for lineage, filtering, replay, and dedupe.

§session_id: Option<SessionId>

Optional host-provided session identifier for grouping related turns. When present, the runtime copies it into journal and event envelopes.

§turn_id: Option<TurnId>

Optional host-provided turn identifier for the user message or loop turn this run answers. When absent, the runtime may derive a deterministic turn id for traceability.

§agent_id: AgentId

Agent identifier used for lineage, filtering, and ownership checks.

§source: SourceRef

Source label or ref for this item; it is metadata and does not fetch content by itself.

§input: String

Input used by this record or request.

§output_contract: Option<OutputContract>

Optional output contract value. When absent, callers should use the documented default or skip that optional behavior.

Implementations§

Source§

impl RunRequest

Source

pub fn text( run_id: RunId, agent_id: AgentId, source: SourceRef, input: impl Into<String>, ) -> Self

Builds the text value. This is data construction and performs no I/O, journal append, event publication, or process work.

Source

pub fn with_output_contract(self, output_contract: OutputContract) -> Self

Returns this value with its output contract setting replaced. The method follows builder-style data construction and does not execute external work.

Source

pub fn with_session_id(self, session_id: SessionId) -> Self

Returns this value with a session id attached for trace grouping. This is data construction only; hosts still own conversation storage.

Source

pub fn with_turn_id(self, turn_id: TurnId) -> Self

Returns this value with a turn id attached for question-scoped tracing. This is data construction only and does not start or resume a run.

Source

pub fn with_session_turn(self, session_id: SessionId, turn_id: TurnId) -> Self

Returns this value with session and turn lineage attached together. This is a thin convenience over the explicit builder methods.

Source

pub fn typed_text<T: TypedOutputModel>( run_id: RunId, agent_id: AgentId, source: SourceRef, input: impl Into<String>, ) -> Self

Builds the typed text value with the documented defaults. This uses only local coordinator state and performs no hidden host work.

Trait Implementations§

Source§

impl Clone for RunRequest

Source§

fn clone(&self) -> RunRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RunRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RunRequest

Source§

impl PartialEq for RunRequest

Source§

fn eq(&self, other: &RunRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RunRequest

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.