pub(crate) fn route_agent_message_from(
block_id: &str,
message: &str,
origin: Option<TurnInput>,
from: MessageOrigin,
inline: &[Value],
expires_at_ms: Option<i64>,
) -> Result<AgentRoute, String>Expand description
Where a message for an agent block goes, and the routing of one, live in the core (backend/agent_route.rs).
The routing half of the reactive sender (bootstrap/delivery.rs), shared with the Swarm broadcast
(server::app_api::fleet) so a broadcast reaches ACP, App Server, running
persistent and not-yet-spawned agents exactly as an inter-agent message does.
Persistent + ACP + App Server keep their structured delivery; genuine PTY
controllers report Pty; a SubprocessController has no PTY and rejects raw
input, so it gets a turn instead (docs/reports/
REPORT_JEKT_DELIVERY_DROPS_SUBPROCESS_AGENTS_2026_09_02.md). An Err is a
structured controller that failed to take the message; it must not be retried
as keystrokes.
Saying who the input is from: the Swarm broadcast
labels its delivery to a running persistent agent as the user’s
(deliver_agent_message_from). None is the plain text route the tests use.