Skip to main content

shared_a2a_route_cache

Function shared_a2a_route_cache 

pub fn shared_a2a_route_cache() -> RouteCache
Expand description

The process-wide shared RouteCache for the outbound A2A client. Tool-set reassembly (every process_message turn and every agent::run invocation constructs a fresh A2aHttpClient) must not drop the route authority of an in-flight task — a SendMessage in one turn that tells the model to poll later must be reachable by GetTask/CancelTask in a later turn. The cache is keyed by (peer, agent, task_id), so independent peer/agent/task lifecycles do not collide. Daemon restart (process exit) naturally clears it — orphaned routes are stale after a restart.