Expand description
In-memory interaction hub - the shared-world replacement for the imperative
worker’s pending.json/response.json file polling.
When an agent’s tool execution needs human input (an ask_user_* /
present_for_review tool, or a tool-approval prompt), its
HubInteractionBackend::ask registers the InteractionRequest with the
InteractionHub and awaits a oneshot for the answer. The daemon surfaces
open requests over the control channel via InteractionHub::pending and
delivers answers with InteractionHub::answer - no filesystem, no polling.
ask blocks the calling tool worker until the request is answered or
cancelled; with the tool lane sequential today that serializes interactive
agents, which is acceptable (the lane becomes a pool later).
Structs§
- HubInteraction
Backend - A per-agent
InteractionBackendthat routesaskthrough anInteractionHub. - Interaction
Hub - A process-wide registry of open interactions, keyed by request id. Cheap to
clone (shared
Arc). Also a bevyResourceso the tick loop’sreflect_interaction_statussystem can mirror open requests into agent status.