#[non_exhaustive]pub struct OperatorInput {
pub message: Content,
pub trigger: TriggerType,
pub session: Option<SessionId>,
pub config: Option<OperatorConfig>,
pub metadata: Value,
}Expand description
Input to an operator. Everything the operator needs to execute.
Design decision: OperatorInput does NOT include conversation history or memory contents. The operator runtime reads those from a StateStore during context assembly. OperatorInput carries the new information that triggered this invocation — not the accumulated state.
This keeps the protocol boundary clean: the caller provides what’s new, the operator runtime decides how to assemble context from what’s new + what’s stored.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: ContentThe new message/task/signal that triggered this operator invocation.
trigger: TriggerTypeWhat caused this operator invocation to start.
session: Option<SessionId>Session for conversation continuity. If None, the operator is stateless. The operator runtime uses this to read history from the StateStore.
config: Option<OperatorConfig>Configuration for this specific operator execution. None means “use the operator runtime’s defaults.”
metadata: ValueOpaque metadata that passes through the operator unchanged. Useful for tracing (trace_id), routing (priority), or domain-specific context that the protocol doesn’t need to understand.
Implementations§
Source§impl OperatorInput
impl OperatorInput
Sourcepub fn new(message: Content, trigger: TriggerType) -> Self
pub fn new(message: Content, trigger: TriggerType) -> Self
Create a new OperatorInput with required fields.
Trait Implementations§
Source§impl Clone for OperatorInput
impl Clone for OperatorInput
Source§fn clone(&self) -> OperatorInput
fn clone(&self) -> OperatorInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more