pub struct OutboxRoute {
pub store: OutboxStore,
/* private fields */
}Expand description
What the agent loop consults per call: the store plus the routed names.
session_id is interior-mutable because the front-end learns it after the
agent (and its default RunContext) is built:
the session is created at run start, the route at setup. Best-effort —
None on front-ends that record no session (batch, eval).
Fields§
§store: OutboxStoreImplementations§
Source§impl OutboxRoute
impl OutboxRoute
pub fn new( store: OutboxStore, routed: impl IntoIterator<Item = String>, publishes: impl IntoIterator<Item = String>, ) -> Self
pub fn routes(&self, tool: &str) -> bool
pub fn routed(&self) -> impl Iterator<Item = &str>
Sourcepub fn kind_of(&self, tool: &str) -> OutboxKind
pub fn kind_of(&self, tool: &str) -> OutboxKind
A tool’s kind, which is config’s to declare and never the tool’s: the loop must not learn what a publish is, and a third-party MCP server cannot be trusted to say. Anything unnamed is a message, which is the conservative default — it keeps the arguments reviewable and the item mineable, and the cost of getting it wrong is a voice rule learned from a path rather than a page nobody could review.
Sourcepub fn publishes(&self) -> impl Iterator<Item = &str>
pub fn publishes(&self) -> impl Iterator<Item = &str>
Names declared as publishes. Used at startup to warn about one that is not routed at all — it would execute unstaged, which is the silently-degrading-sandbox shape the routed-name warning already catches.