Skip to main content

deliver_agent_message_from

Function deliver_agent_message_from 

Source
pub fn deliver_agent_message_from(
    block_id: &str,
    message: &str,
    origin: Option<TurnInput>,
    from: MessageOrigin,
    inline: &[Value],
    expires_at_ms: Option<i64>,
) -> Result<AgentDelivery, String>
Expand description

[deliver_agent_message], saying who the input is from (turn provenance, SPEC_AGENT_SELF_QUIT §6.3). Only the persistent controller records it (see send_user_message_outcome_from); ACP and App Server turns carry no turn provenance, but both store from with the message in the transcript.

from says where the message came from, for the record of it (message_origin): a producer that doesn’t say doesn’t compile.

expires_at_ms is the sender’s expiry (InjectionRequest::expires_at_ms, issue #3894): only the persistent controller’s deferred queue uses it — a message queued while its process was starting, restarting or stopping is dropped at write time once the expiry has passed. Every other controller delivers at once, so it ignores it.