Struct IngressContext
pub struct IngressContext {
pub message_id: Option<String>,
pub source_class: SourceClass,
pub sender: Option<String>,
pub transport: Transport,
pub trust: TrustClass,
pub origin: TurnOrigin,
}Expand description
The envelope stamped by the entry layer; travels with the turn into the engine. See the module docs.
Fields§
§message_id: Option<String>Stable inbound id (e.g. a ChannelMessage.id) — provenance + audit
handle. None for id-less internal turns.
source_class: SourceClassWhether the turn is external or internally driven.
sender: Option<String>Platform user id / principal of the sender, if any.
transport: TransportThe transport the turn arrived on.
trust: TrustClassThe resolved trust class of the sender.
origin: TurnOriginWho initiated the turn (see TurnOrigin). Serde-defaults to
TurnOrigin::SubTurn so envelopes serialized before this field
existed deserialize fail-closed (no origin-gated behavior).
Implementations§
Source§impl IngressContext
impl IngressContext
Sourcepub fn interactive() -> Self
pub fn interactive() -> Self
Envelope for an interactive operator turn (CLI chat loop, one-shot run).
Sourcepub fn channel() -> Self
pub fn channel() -> Self
Envelope for a turn the channel orchestrator dispatches for a channel peer. Keeps the placeholder source/transport/trust; the real channel transport identity is not stamped at the edge yet.
Sourcepub fn agent_direct() -> Self
pub fn agent_direct() -> Self
Envelope for a direct embedded Agent::turn call.
Sourcepub fn sub_turn() -> Self
pub fn sub_turn() -> Self
Envelope for a nested sub-turn inside a parent turn (delegate subagent, safety net, skills review). Sub-turns never receive origin-gated behavior such as context injection.
Sourcepub fn from_origin(origin: TurnOrigin) -> Self
pub fn from_origin(origin: TurnOrigin) -> Self
Envelope for a turn whose origin is threaded in from the entry
point (e.g. agent::run / process_message, whose one body serves
several distinct entries: CLI, cron, daemon, subagent spawn).
Equivalent to the per-origin constructors above.
Trait Implementations§
Source§impl Clone for IngressContext
impl Clone for IngressContext
Source§fn clone(&self) -> IngressContext
fn clone(&self) -> IngressContext
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more