Expand description
Outbound human-directed messaging as a runtime capability.
CAR owns tools, state, retry, idempotency, timeouts and rollback — but historically NOT “send a message to a human”. Every agent that needed to reach a person hand-rolled its own transport, which put the single most visible side effect an agent can have outside the runtime’s sight: the declarative policy engine could not see it, the rate limiter could not bound it, and the event log did not record it.
This module is the seam that closes that. The runtime does not own a
transport — same as it does not own tools — it owns the verb. A host
attaches a MessageSink (see car-messaging’s OutboundRegistry for
the production one), and messaging.send becomes a first-class tool that
flows through the same validator → policy → rate-limit → eventlog chain as
every other side effect.
Two invariants are worth stating because they are easy to erode:
- A tool the runtime cannot execute is never advertised. The schema is
registered by
crate::Runtime::with_message_sinkand nowhere else. - No fall-through. With no sink attached,
messaging.sendis an error, not a request handed to the configured host executor. A silent fall-through would re-open the exact ungoverned path this exists to close.
Structs§
- Message
Receipt - What a sink reports back about a delivered (or suppressed) send.
- Outbound
Message - One outbound message, as the runtime hands it to a sink.
Enums§
- Recipient
- Where a message is addressed.
Traits§
- Message
Sink - The host-supplied outbound transport the runtime dispatches
messaging.sendto.